summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--version.h2
-rw-r--r--vm_insnhelper.c4
3 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3b107fbc75..8b8835ded5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Feb 19 22:37:42 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
+
+ * vm_insnhelper.c (vm_check_if_namespace): guard temporary object
+ from GC.
+
Fri Feb 18 00:28:39 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
* compile.c (get_exception_sym2type): guard temporary object from GC.
diff --git a/version.h b/version.h
index b2c563fcf8..912448c4e4 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2"
-#define RUBY_PATCHLEVEL 202
+#define RUBY_PATCHLEVEL 203
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 00856d38ee..9f2d050ec7 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1134,13 +1134,15 @@ vm_get_const_base(const rb_iseq_t *iseq, const VALUE *lfp, const VALUE *dfp)
static inline void
vm_check_if_namespace(VALUE klass)
{
+ VALUE str;
switch (TYPE(klass)) {
case T_CLASS:
case T_MODULE:
break;
default:
+ str = rb_inspect(klass);
rb_raise(rb_eTypeError, "%s is not a class/module",
- RSTRING_PTR(rb_inspect(klass)));
+ RSTRING_PTR(RB_GC_GUARD(str)));
}
}