aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--error.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 341281b90c..a2039008e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Dec 23 11:00:09 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * error.c (rb_check_type): check for type from extensions for ruby
+ 1.8. see [ruby-core:33797].
+
Thu Dec 23 08:12:59 2010 Aaron Patterson <aaron@tenderlovemaking.com>
* lib/net/smtp.rb: refactoring Net::SMTP#esmtp= to use an
diff --git a/error.c b/error.c
index 7c9e22b9ed..bfbc86cce9 100644
--- a/error.c
+++ b/error.c
@@ -354,7 +354,10 @@ rb_check_type(VALUE x, int t)
}
type++;
}
- rb_bug("unknown type 0x%x (0x%x given)", t, TYPE(x));
+ if (xt > T_MASK && xt <= 0x3f) {
+ rb_fatal("unknown type 0x%x (0x%x given, probably comes from extension library for ruby 1.8)", t, xt);
+ }
+ rb_bug("unknown type 0x%x (0x%x given)", t, xt);
}
}