* string.c (rb_str_ord): extract lower byte. fixed: [ruby-dev:28980]
* lib/jcode.rb (String#succ!): fix for 1.9. fixed: [ruby-dev:28979] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9dc29ddfd7
commit
0fbcc455bd
@ -1,3 +1,9 @@
|
||||
Fri Jul 7 17:49:16 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* string.c (rb_str_ord): extract lower byte. fixed: [ruby-dev:28980]
|
||||
|
||||
* lib/jcode.rb (String#succ!): fix for 1.9. fixed: [ruby-dev:28979]
|
||||
|
||||
Fri Jul 7 14:05:03 2006 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* win32/Makefile.sub (config.h): define FUNC_STDCALL/FUNC_CDECL.
|
||||
|
@ -79,9 +79,12 @@ class String
|
||||
reg = end_regexp
|
||||
if self =~ reg
|
||||
succ_table = SUCC[$KCODE[0,1].downcase]
|
||||
last1 = self[-1].ord
|
||||
last2 = self[-2].ord
|
||||
begin
|
||||
self[-1] += succ_table[self[-1]]
|
||||
self[-2] += 1 if self[-1] == 0
|
||||
last1 += succ_table[last1]
|
||||
last2 += 1 if last1 == 0
|
||||
self[-2..-1] = [last2, last1].pack("C*")
|
||||
end while self !~ reg
|
||||
self
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user