From 6270ce85ed36d2844166facb937c2a9f63fb022f Mon Sep 17 00:00:00 2001 From: kosaki Date: Fri, 15 Jul 2011 16:06:53 +0000 Subject: [PATCH] * time.c (time_dup): used rb_obj_class() instead of CLASS_OF(). The patch is made by Kazuki Tsujimoto. [Bug #5012] [ruby-dev:44071] * test/ruby/test_time.rb (TestTime#test_getlocal_dont_share_eigenclass): added a new test for eigenclass of time object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ test/ruby/test_time.rb | 14 ++++++++++++++ time.c | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d1bcfbf9e0..aebfb852b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Sat Jul 16 00:55:38 2011 KOSAKI Motohiro + + * time.c (time_dup): used rb_obj_class() instead of CLASS_OF(). + The patch is made by Kazuki Tsujimoto. [Bug #5012] [ruby-dev:44071] + + * test/ruby/test_time.rb (TestTime#test_getlocal_dont_share_eigenclass): + added a new test for eigenclass of time object. + Fri Jul 15 19:11:00 2011 Kenta Murata * bignum.c (bigsub_int): add RB_GC_GUARD. This patch is made by diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb index 6a00b99443..aea4c2edc0 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -697,4 +697,18 @@ class TestTime < Test::Unit::TestCase off += 0.1 } end + + def test_getlocal_dont_share_eigenclass + bug5012 = "[ruby-dev:44071]" + + t0 = Time.now + class <