summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-04 03:16:55 (GMT)
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-04 03:16:55 (GMT)
commit3056186947891523de7a4f86b8bebea8f422559a (patch)
tree03abe618ea13fd6df01bb1be78a868c71eb5f8a6
parent91db0310271249ca3756b77f67824ee7e43e7bd1 (diff)
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_6@18325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog11
-rw-r--r--error.c2
-rw-r--r--eval.c6
-rw-r--r--gc.c3
-rw-r--r--version.h11
5 files changed, 24 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 26d94f1..e011673 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Mon Aug 4 12:11:29 2008 Tanaka Akira <akr@fsij.org>
+
+ * gc.c (Init_GC): fix syntax error.
+
+Mon Aug 4 12:11:29 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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.
+
Thu Jul 17 21:37:39 2008 URABE Shyouhei <shyouhei@ruby-lang.org>
* lib/net/smtp.rb (Net::SMTP::start): revert to avoid RFC2821
diff --git a/error.c b/error.c
index 608d1fa..73d7934 100644
--- a/error.c
+++ b/error.c
@@ -334,7 +334,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 d384a69..54a0fee 100644
--- a/eval.c
+++ b/eval.c
@@ -9715,13 +9715,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 807d8eb..33f035e 100644
--- a/gc.c
+++ b/gc.c
@@ -2069,7 +2069,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 3cb2812..00fc1a5 100644
--- a/version.h
+++ b/version.h
@@ -1,15 +1,15 @@
#define RUBY_VERSION "1.8.6"
-#define RUBY_RELEASE_DATE "2008-07-17"
+#define RUBY_RELEASE_DATE "2008-08-04"
#define RUBY_VERSION_CODE 186
-#define RUBY_RELEASE_CODE 20080717
-#define RUBY_PATCHLEVEL 279
+#define RUBY_RELEASE_CODE 20080804
+#define RUBY_PATCHLEVEL 280
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 6
#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[];
@@ -18,3 +18,4 @@ RUBY_EXTERN const char ruby_platform[];
RUBY_EXTERN const int ruby_patchlevel;
#endif
+