mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
merge revision(s) r33613:
* complex.c (nucomp_rationalize): fix function. [ruby-core:40667] [Bug #5546] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
58398d5106
commit
5ce73b510e
4 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Wed Nov 30 18:22:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* complex.c (nucomp_rationalize): fix function. [ruby-core:40667]
|
||||||
|
[Bug #5546]
|
||||||
|
|
||||||
Thu Nov 17 10:36:46 2011 Aaron Patterson <aaron@tenderlovemaking.com>
|
Thu Nov 17 10:36:46 2011 Aaron Patterson <aaron@tenderlovemaking.com>
|
||||||
|
|
||||||
* ext/psych/lib/psych.rb (load_file): make sure opened yaml files are
|
* ext/psych/lib/psych.rb (load_file): make sure opened yaml files are
|
||||||
|
|
|
@ -1374,7 +1374,7 @@ nucomp_rationalize(int argc, VALUE *argv, VALUE self)
|
||||||
rb_raise(rb_eRangeError, "can't convert %s into Rational",
|
rb_raise(rb_eRangeError, "can't convert %s into Rational",
|
||||||
StringValuePtr(s));
|
StringValuePtr(s));
|
||||||
}
|
}
|
||||||
return rb_funcall(dat->real, rb_intern("rationalize"), argc, argv);
|
return rb_funcall2(dat->real, rb_intern("rationalize"), argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -16,6 +16,7 @@ class Complex_Test < Test::Unit::TestCase
|
||||||
def test_rationalize
|
def test_rationalize
|
||||||
assert_equal(1.quo(3), Complex(1/3.0, 0).rationalize, '[ruby-core:38885]')
|
assert_equal(1.quo(3), Complex(1/3.0, 0).rationalize, '[ruby-core:38885]')
|
||||||
assert_equal(1.quo(5), Complex(0.2, 0).rationalize, '[ruby-core:38885]')
|
assert_equal(1.quo(5), Complex(0.2, 0).rationalize, '[ruby-core:38885]')
|
||||||
|
assert_equal(5.quo(2), Complex(2.5, 0).rationalize(0), '[ruby-core:40667]')
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_compsub
|
def test_compsub
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#define RUBY_VERSION "1.9.3"
|
#define RUBY_VERSION "1.9.3"
|
||||||
#define RUBY_PATCHLEVEL 4
|
#define RUBY_PATCHLEVEL 5
|
||||||
|
|
||||||
#define RUBY_RELEASE_DATE "2011-11-30"
|
#define RUBY_RELEASE_DATE "2011-11-30"
|
||||||
#define RUBY_RELEASE_YEAR 2011
|
#define RUBY_RELEASE_YEAR 2011
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue