diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-06 11:43:40 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-06 11:43:40 +0000 |
commit | 05d4bbbbda3896b206006a8c2d7cd509a94ba9bd (patch) | |
tree | c18f21579897ffbb259c1b66c21899b51aa0e4c6 | |
parent | 0f0658d08f3661ef9cc5fc7ee5ce952db0c657cd (diff) |
* string.c (rb_str_sub_bang): calling rb_str_modify() should be just
before actually modifying the string.
fixed: [ruby-dev:30211] (originally reported by zunda)
* patchlevel 18.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@11646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | string.c | 2 | ||||
-rw-r--r-- | version.h | 10 |
3 files changed, 12 insertions, 6 deletions
@@ -1,3 +1,9 @@ +Tue Feb 6 20:41:39 2007 NAKAMURA Usaku <usa@ruby-lang.org> + + * string.c (rb_str_sub_bang): calling rb_str_modify() should be just + before actually modifying the string. + fixed: [ruby-dev:30211] (originally reported by zunda) + Sat Jan 27 15:20:11 2007 Yukihiro Matsumoto <matz@ruby-lang.org> * parse.y (dyna_var_lookup): should not alter dvar->val not to @@ -1963,7 +1963,6 @@ rb_str_sub_bang(argc, argv, str) pat = get_pat(argv[0], 1); if (rb_reg_search(pat, str, 0, 0) >= 0) { - rb_str_modify(str); match = rb_backref_get(); regs = RMATCH(match)->regs; @@ -1979,6 +1978,7 @@ rb_str_sub_bang(argc, argv, str) else { repl = rb_reg_regsub(repl, str, regs); } + rb_str_modify(str); if (OBJ_TAINTED(repl)) tainted = 1; plen = END(0) - BEG(0); if (RSTRING(repl)->len > plen) { @@ -1,15 +1,15 @@ #define RUBY_VERSION "1.8.5" -#define RUBY_RELEASE_DATE "2007-01-27" +#define RUBY_RELEASE_DATE "2007-02-06" #define RUBY_VERSION_CODE 185 -#define RUBY_RELEASE_CODE 20070127 -#define RUBY_PATCHLEVEL 17 +#define RUBY_RELEASE_CODE 20070206 +#define RUBY_PATCHLEVEL 18 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 #define RUBY_VERSION_TEENY 5 #define RUBY_RELEASE_YEAR 2007 -#define RUBY_RELEASE_MONTH 1 -#define RUBY_RELEASE_DAY 27 +#define RUBY_RELEASE_MONTH 2 +#define RUBY_RELEASE_DAY 6 RUBY_EXTERN const char ruby_version[]; RUBY_EXTERN const char ruby_release_date[]; |