fix jacobian to get stuck in an infinite loop when a solution is not
found due to forget to increment nRetry counter.
Patch by alperakgun from github.com/shyouhei/ruby/pull/8
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
must not cast it to unsigned long, which may be shorter than
VALUE, and the result can be mere garbage.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
RB_GC_GUARD() is only for variables on the machine stack, because it
forces a VALUE to be stored in a variable which should be referenced
from the GC, but does not add any reference path to the variable.
So it makes no sense for objects in heap.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
can be overridden, so should not make an assumption on the type
of results. [ruby-core:42969][Bug #6093]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
zero or negative precision is error. fixes#5098.
[ruby-dev:44210]
* test/bigdecimal/test_bigdecimal_util.rb: add test for the above
change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
specifying precision. fixes#5098. [ruby-dev:44210]
* test/bigdecimal/test_bigdecimal_util.rb: add test for the above
change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
for symmetry to BigDecimal() function with an Integer.
fixes#5098. [ruby-dev:44210]
* test/bigdecimal/test_bigdecimal_util.rb: add test for the above
change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
for adapting other Numeric subclasses. [ruby-dev:44245]
* test/bigdecimal/test_bigdecimal_util.rb: test for the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
a BigDecimal.
* bigdecimal/bigdecimal.c (BigDecimal_new): support generating a new
BigDecimal from another BigDecimal using BigDecimal global function
or constructor. [ruby-dev:44245]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
precision treatment errors.
* test/bigdecimal/test_bigdecimal.rb: add tests for the above change.
fix precision treatment errors.
* ext/bigdecimal/bigdecimal.c (BigDecimal_power): precision argument
should be optional for its compatibility.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
for Float and Rational arguments.
* test/bigdecimal/test_bigdecimal.rb (test_new, test_cmp, test_power):
add and modify tests for the above change.
* ext/bigdecimal/bigdecimal.c (BigDecimalCmp): modify coding style to
match ruby's standard.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
a Float through Rational.
* ext/bigdecimal/bigdecimal.c (BigDecimal_new): ditto.
* test/bigdecimal/test_bigdecimal.rb (test_global_new_float): add a test for
the above changes.
* test/bigdecimal/test_bigdecimal.rb (test_new_with_float): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Rational. The precision used for instantiate a BigDecimal from the
given Rational is obtained from the receiver BigDecimal.
* test/bigdecimal/test_bigdecimal.rb (test_coerce): add a test for the
above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
coercing from a Rational to stop requiring "bigecimal/util.rb".
[ruby-core:34318]
* ext/bigdecimal/bigdecimal.c (GetVpValue): refactoring.
* ext/bigdecimal/bigdecimal.c (BigDecimal_new): support instantiation from a
Rational.
* test/bigdecimal/test_bigdecimal.rb (test_global_new_with_rationao): add a
test for the above change.
* test/bigdecimal/test_bigdecimal.rb (test_new_with_rationao): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
BigDecimal object from an Integer.
* test/bigdecimal/test_bigdecimal.rb (test_new_with_integer):
add for testing the above change.
* ext/bigdecimal/bigdecimal.c (BigDecimal_global_new): replace its body
with a BigDecimal_new call.
* test/bigdecimal/test_bigdecimal.rb (test_global_new_with_integer):
add for testing the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e