зеркало из https://github.com/github/ruby.git
* re.c (rb_reg_regsub): returns -1 unless ascii as well as
rb_enc_ascget(). [ruby-dev:37097] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
1bd83c1fe0
Коммит
316b78a56d
|
@ -1,3 +1,8 @@
|
|||
Sat Nov 15 22:46:32 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* re.c (rb_reg_regsub): returns -1 unless ascii as well as
|
||||
rb_enc_ascget(). [ruby-dev:37097]
|
||||
|
||||
Sat Nov 15 22:23:45 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in (LDSHARED): do not suppress debug info if higher debug
|
||||
|
|
2
re.c
2
re.c
|
@ -3141,7 +3141,7 @@ rb_reg_regsub(VALUE str, VALUE src, struct re_registers *regs, VALUE regexp)
|
|||
rb_encoding *str_enc = rb_enc_get(str);
|
||||
rb_encoding *src_enc = rb_enc_get(src);
|
||||
int acompat = rb_enc_asciicompat(str_enc);
|
||||
#define ASCGET(s,e,cl) (acompat ? (*cl=1,s[0]) : rb_enc_ascget(s, e, cl, str_enc))
|
||||
#define ASCGET(s,e,cl) (acompat ? (*cl=1,ISASCII(s[0])?s[0]:-1) : rb_enc_ascget(s, e, cl, str_enc))
|
||||
|
||||
p = s = RSTRING_PTR(str);
|
||||
e = s + RSTRING_LEN(str);
|
||||
|
|
Загрузка…
Ссылка в новой задаче