Permalink
Browse files

merge revision(s) 36593: [Backport #7407]

	* gc.c: return true or false. Patch by Dirkjan Bussink. [Bug #6821]

	* test/ruby/test_gc.rb: add test-case for this bug.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@38469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
1 parent 60e7104 commit 59995abc1ea07a2278a9f87b66587c65486e01da @unak unak committed Dec 19, 2012
Showing with 17 additions and 2 deletions.
  1. +6 −0 ChangeLog
  2. +1 −1 gc.c
  3. +9 −0 test/ruby/test_gc.rb
  4. +1 −1 version.h
View
6 ChangeLog
@@ -1,3 +1,9 @@
+Wed Dec 19 21:14:28 2012 Narihiro Nakamura <authornari@gmail.com>
+
+ * gc.c: return true or false. Patch by Dirkjan Bussink. [Bug #6821]
+
+ * test/ruby/test_gc.rb: add test-case for this bug.
+
Wed Dec 19 21:12:49 2012 Shugo Maeda <shugo@ruby-lang.org>
* marshal.c (r_entry0): don't taint classes and modules because
View
2 gc.c
@@ -627,7 +627,7 @@ static VALUE
gc_profile_enable_get(VALUE self)
{
rb_objspace_t *objspace = &rb_objspace;
- return objspace->profile.run;
+ return objspace->profile.run ? Qtrue : Qfalse;
}
/*
View
9 test/ruby/test_gc.rb
@@ -97,4 +97,13 @@ def test_gc_parameter
assert_in_out_err([env, "-W1", "-e", "exit"], "", [], [], "[ruby-core:39795]")
assert_in_out_err([env, "-w", "-e", "exit"], "", [], /heap_min_slots=100000/, "[ruby-core:39795]")
end
+
+ def test_profiler_enabled
+ GC::Profiler.enable
+ assert_equal(true, GC::Profiler.enabled?)
+ GC::Profiler.disable
+ assert_equal(false, GC::Profiler.enabled?)
+ ensure
+ GC::Profiler.disable
+ end
end
View
2 version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 342
+#define RUBY_PATCHLEVEL 343
#define RUBY_RELEASE_DATE "2012-12-19"
#define RUBY_RELEASE_YEAR 2012

0 comments on commit 59995ab

Please sign in to comment.