diff options
-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[]; |