1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/bigdecimal/bigdecimal.c (Init_bigdecimal): define IDs before

they are used. [ruby-core:44900] [Bug #6406]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2012-05-07 02:03:28 +00:00
parent cc3f33073d
commit 0fce0545b6
3 changed files with 15 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Mon May 7 10:49:36 2012 NARUSE, Yui <naruse@ruby-lang.org>
* ext/bigdecimal/bigdecimal.c (Init_bigdecimal): define IDs before
they are used. [ruby-core:44900] [Bug #6406]
Mon May 7 10:27:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/digest/rmd160/rmd160.c (RMD160_Update): fix for huge data.

View file

@ -2858,6 +2858,10 @@ Init_bigdecimal(void)
{
VALUE arg;
id_BigDecimal_exception_mode = rb_intern_const("BigDecimal.exception_mode");
id_BigDecimal_rounding_mode = rb_intern_const("BigDecimal.rounding_mode");
id_BigDecimal_precision_limit = rb_intern_const("BigDecimal.precision_limit");
/* Initialize VP routines */
VpInit(0UL);
@ -3053,10 +3057,6 @@ Init_bigdecimal(void)
rb_define_singleton_method(rb_mBigMath, "exp", BigMath_s_exp, 2);
rb_define_singleton_method(rb_mBigMath, "log", BigMath_s_log, 2);
id_BigDecimal_exception_mode = rb_intern_const("BigDecimal.exception_mode");
id_BigDecimal_rounding_mode = rb_intern_const("BigDecimal.rounding_mode");
id_BigDecimal_precision_limit = rb_intern_const("BigDecimal.precision_limit");
id_up = rb_intern_const("up");
id_down = rb_intern_const("down");
id_truncate = rb_intern_const("truncate");

View file

@ -1311,4 +1311,10 @@ class TestBigDecimal < Test::Unit::TestCase
code = "exit(BigDecimal.new('10.0') == 10.0.to_d)"
assert_ruby_status(%w[-rbigdecimal -rbigdecimal/util -rmathn -], code, bug6093)
end
def test_bug6406
assert_in_out_err(%w[-rbigdecimal --disable-gems], <<-EOS, [], [])
Thread.current.keys.to_s
EOS
end
end