summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--test/thread/test_cv.rb5
-rw-r--r--variable.c7
-rw-r--r--version.h8
4 files changed, 22 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index af260ed19a..3894e03503 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Thu Sep 12 00:22:22 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+
+ * variable.c (classname): the name of class that has
+ non class id should not be nil. This bug was introduced
+ in r36577.
+
+ * test/thread/test_cv.rb: test for change.
+
Thu Aug 29 21:51:33 2013 Eric Hodel <drbrain@segment7.net>
* ext/zlib/zlib.c (zstream_run): Fix handling of deflate streams that
diff --git a/test/thread/test_cv.rb b/test/thread/test_cv.rb
index eeec3b3ea5..9a9b407a5b 100644
--- a/test/thread/test_cv.rb
+++ b/test/thread/test_cv.rb
@@ -82,20 +82,23 @@ class TestConditionVariable < Test::Unit::TestCase
end
def test_condvar_wait_deadlock
- assert_in_out_err([], <<-INPUT, ["No live threads left. Deadlock?"], [])
+ assert_in_out_err([], <<-INPUT, ["fatal", "No live threads left. Deadlock?"], [])
require "thread"
mutex = Mutex.new
cv = ConditionVariable.new
+ klass = nil
mesg = nil
begin
mutex.lock
cv.wait mutex
mutex.unlock
rescue Exception => e
+ klass = e.class
mesg = e.message
end
+ puts klass
print mesg
INPUT
end
diff --git a/variable.c b/variable.c
index 1be62dc1db..080cf39e00 100644
--- a/variable.c
+++ b/variable.c
@@ -175,9 +175,14 @@ classname(VALUE klass, int *permanent)
path = find_class_path(klass, (ID)0);
}
if (NIL_P(path)) {
- if (!cid || !st_lookup(RCLASS_IV_TBL(klass), (st_data_t)tmp_classpath, &n)) {
+ if (!cid) {
return Qnil;
}
+ if (!st_lookup(RCLASS_IV_TBL(klass), (st_data_t)tmp_classpath, &n)) {
+ path = rb_str_dup(rb_id2str(cid));
+ OBJ_FREEZE(path);
+ return path;
+ }
*permanent = 0;
path = (VALUE)n;
return path;
diff --git a/version.h b/version.h
index e7f30c223d..e092520d5c 100644
--- a/version.h
+++ b/version.h
@@ -1,10 +1,10 @@
#define RUBY_VERSION "2.0.0"
-#define RUBY_RELEASE_DATE "2013-08-29"
-#define RUBY_PATCHLEVEL 299
+#define RUBY_RELEASE_DATE "2013-09-12"
+#define RUBY_PATCHLEVEL 300
#define RUBY_RELEASE_YEAR 2013
-#define RUBY_RELEASE_MONTH 8
-#define RUBY_RELEASE_DAY 29
+#define RUBY_RELEASE_MONTH 9
+#define RUBY_RELEASE_DAY 12
#include "ruby/version.h"