File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change
1
+ Tue Feb 17 11:58:58 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
2
+
3
+ * string.c (str_independent): no independent string points null_str.
4
+ [ruby-core:20082]
5
+
1
6
Mon Feb 16 23:30:24 2009 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
2
7
3
8
* ext/tk/lib/tkextlib/blt.rb, ext/tk/lib/tkextlib/blt/vector.rb:
Original file line number Diff line number Diff line change @@ -471,6 +471,8 @@ rb_str_format_m(str, arg)
471
471
return rb_str_format (1 , & arg , str );
472
472
}
473
473
474
+ static const char null_str [] = "" ;
475
+
474
476
static int
475
477
str_independent (str )
476
478
VALUE str ;
@@ -481,6 +483,7 @@ str_independent(str)
481
483
if (OBJ_FROZEN (str )) rb_error_frozen ("string" );
482
484
if (!OBJ_TAINTED (str ) && rb_safe_level () >= 4 )
483
485
rb_raise (rb_eSecurityError , "Insecure: can't modify string" );
486
+ if (RSTRING (str )-> ptr == null_str ) return 0 ;
484
487
if (!FL_TEST (str , ELTS_SHARED )) return 1 ;
485
488
return 0 ;
486
489
}
@@ -539,7 +542,6 @@ rb_str_associated(str)
539
542
return Qfalse ;
540
543
}
541
544
542
- static const char null_str [] = "" ;
543
545
#define make_null_str (s ) do { \
544
546
FL_SET(s, ELTS_SHARED); \
545
547
RSTRING(s)->ptr = (char *)null_str; \
Original file line number Diff line number Diff line change 1
1
#define RUBY_VERSION "1.8.7"
2
- #define RUBY_RELEASE_DATE "2009-02-16 "
2
+ #define RUBY_RELEASE_DATE "2009-02-17 "
3
3
#define RUBY_VERSION_CODE 187
4
- #define RUBY_RELEASE_CODE 20090216
5
- #define RUBY_PATCHLEVEL 122
4
+ #define RUBY_RELEASE_CODE 20090217
5
+ #define RUBY_PATCHLEVEL 123
6
6
7
7
#define RUBY_VERSION_MAJOR 1
8
8
#define RUBY_VERSION_MINOR 8
9
9
#define RUBY_VERSION_TEENY 7
10
10
#define RUBY_RELEASE_YEAR 2009
11
11
#define RUBY_RELEASE_MONTH 2
12
- #define RUBY_RELEASE_DAY 16
12
+ #define RUBY_RELEASE_DAY 17
13
13
14
14
#ifdef RUBY_EXTERN
15
15
RUBY_EXTERN const char ruby_version [];
You can’t perform that action at this time.
0 commit comments