summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-04 03:24:26 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-04 03:24:26 +0000
commitd1911459aed44a294cd8d2ef8e5c723c656f63ca (patch)
tree0c2801e3d521e96f56229538318867b805281bd5
parent296150a27ff784cc0fd3d52dabc6e67a3d96d662 (diff)
downloadruby-d1911459aed44a294cd8d2ef8e5c723c656f63ca.tar.gz
merge revision(s) 17833:17837:
* gc.c (Init_GC): fix syntax error. * error.c (rb_exc_new3): keeps the given string itself. * eval.c (Init_Proc), gc.c (Init_GC): freeze messages of preallocated special exceptions also. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@18327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--error.c2
-rw-r--r--eval.c6
-rw-r--r--gc.c3
-rw-r--r--version.h11
4 files changed, 13 insertions, 9 deletions
diff --git a/error.c b/error.c
index c6d7e6e107..a991f55e57 100644
--- a/error.c
+++ b/error.c
@@ -333,7 +333,7 @@ rb_exc_new3(etype, str)
VALUE etype, str;
{
StringValue(str);
- return rb_exc_new(etype, RSTRING(str)->ptr, RSTRING(str)->len);
+ return rb_funcall(etype, rb_intern("new"), 1, str);
}
/*
diff --git a/eval.c b/eval.c
index 698e04971c..a3e1c9ea1d 100644
--- a/eval.c
+++ b/eval.c
@@ -9992,13 +9992,15 @@ Init_Proc()
rb_define_method(rb_eLocalJumpError, "reason", localjump_reason, 0);
rb_global_variable(&exception_error);
- exception_error = rb_exc_new2(rb_eFatal, "exception reentered");
+ exception_error = rb_exc_new3(rb_eFatal,
+ rb_obj_freeze(rb_str_new2("exception reentered")));
OBJ_TAINT(exception_error);
OBJ_FREEZE(exception_error);
rb_eSysStackError = rb_define_class("SystemStackError", rb_eStandardError);
rb_global_variable(&sysstack_error);
- sysstack_error = rb_exc_new2(rb_eSysStackError, "stack level too deep");
+ sysstack_error = rb_exc_new3(rb_eSysStackError,
+ rb_obj_freeze(rb_str_new2("stack level too deep")));
OBJ_TAINT(sysstack_error);
OBJ_FREEZE(sysstack_error);
diff --git a/gc.c b/gc.c
index f75a11a937..5e6dd2d8e1 100644
--- a/gc.c
+++ b/gc.c
@@ -2115,7 +2115,8 @@ Init_GC()
source_filenames = st_init_strtable();
rb_global_variable(&nomem_error);
- nomem_error = rb_exc_new2(rb_eNoMemError, "failed to allocate memory");
+ nomem_error = rb_exc_new3(rb_eNoMemError,
+ rb_obj_freeze(rb_str_new2("failed to allocate memory")));
OBJ_TAINT(nomem_error);
OBJ_FREEZE(nomem_error);
diff --git a/version.h b/version.h
index d0b8bc9ff6..c24a109b2b 100644
--- a/version.h
+++ b/version.h
@@ -1,15 +1,15 @@
#define RUBY_VERSION "1.8.7"
-#define RUBY_RELEASE_DATE "2008-07-17"
+#define RUBY_RELEASE_DATE "2008-08-04"
#define RUBY_VERSION_CODE 187
-#define RUBY_RELEASE_CODE 20080717
-#define RUBY_PATCHLEVEL 63
+#define RUBY_RELEASE_CODE 20080804
+#define RUBY_PATCHLEVEL 64
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 7
#define RUBY_RELEASE_YEAR 2008
-#define RUBY_RELEASE_MONTH 7
-#define RUBY_RELEASE_DAY 17
+#define RUBY_RELEASE_MONTH 8
+#define RUBY_RELEASE_DAY 4
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];
@@ -28,3 +28,4 @@ RUBY_EXTERN const char *ruby_copyright;
#define RUBY_RELEASE_STR "patchlevel"
#define RUBY_RELEASE_NUM RUBY_PATCHLEVEL
+