summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--lib/jcode.rb3
2 files changed, 6 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 2ab4df943f..8f66784b50 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,13 +1,13 @@
+Fri Sep 29 12:11:04 2006 WATANABE Hirofumi <eban@ruby-lang.org>
+
+ * jcode.rb (succ!): call original succ! if $KCODE == 'n'.
+ fixed: [ruby-talk:216845]
+
Fri Sep 29 11:43:40 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/mkmf.rb (try_func): revert fallback checking undeclared function.
fixed: [ruby-core:08949]
-Fri Sep 29 10:59:16 2006 WATANABE Hirofumi <eban@ruby-lang.org>
-
- * lib/jcode.rb: need to initialize SUCC['n'].
- fixed: [ruby-talk:216845]
-
Fri Sep 29 09:56:56 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/extmk.rb: extout is needed for also clean.
diff --git a/lib/jcode.rb b/lib/jcode.rb
index 8a938254bb..78422f296f 100644
--- a/lib/jcode.rb
+++ b/lib/jcode.rb
@@ -24,7 +24,6 @@ class String
RE_UTF8 = Regexp.new(PATTERN_UTF8, 0, 'n')
SUCC = {}
- SUCC['n'] = Hash.new(1)
SUCC['s'] = Hash.new(1)
for i in 0 .. 0x3f
SUCC['s'][i.chr] = 0x40 - i
@@ -78,7 +77,7 @@ class String
def succ!
reg = end_regexp
- if self =~ reg
+ if $KCODE != 'NONE' && self =~ reg
succ_table = SUCC[$KCODE[0,1].downcase]
begin
self[-1] += succ_table[self[-1]]