mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* jcode.rb (succ!): call original succ! if $KCODE == 'n'.
fixed: [ruby-talk:216845] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d846e10d73
commit
a601d81634
2 changed files with 6 additions and 7 deletions
|
@ -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]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue