mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* re.c (rb_reg_initialize_m): use StringValuePtr instead of
StringValueCStr because \0 exists when Regexp.new("\0"). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
06f2b5b1d8
commit
794fc684e8
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Nov 4 23:51:59 2007 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* re.c (rb_reg_initialize_m): use StringValuePtr instead of
|
||||
StringValueCStr because \0 exists when Regexp.new("\0").
|
||||
|
||||
Sun Nov 4 08:11:19 2007 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* gc.c (count_objects): count TOTAL.
|
||||
|
|
2
re.c
2
re.c
|
@ -1617,7 +1617,7 @@ rb_reg_initialize_m(int argc, VALUE *argv, VALUE self)
|
|||
}
|
||||
}
|
||||
str = argv[0];
|
||||
ptr = StringValueCStr(str);
|
||||
ptr = StringValuePtr(str);
|
||||
if (enc
|
||||
? rb_reg_initialize(self, ptr, RSTRING_LEN(str), enc, flags, err)
|
||||
: rb_reg_initialize_str(self, str, flags, err)) {
|
||||
|
|
Loading…
Reference in a new issue