| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
instead of RARRAY_PTR().
* io.c (rb_io_s_popen): ditto.
* numeric.c (num_step_size): ditto.
* vm_eval.c (rb_apply): ditto.
* vm_eval.c (rb_eval_cmd): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
add links to `Object#hash` to each #`hash` methods rdocs.
[Fixes GH-567]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
of siginificant digits. See #9191
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* numeric.c (id_eq, id_cmp): use predefined constants in id.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* numeric.c (ruby_num_interval_step_size): get rid of float
conversion overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* numeric.c (ruby_num_interval_step_size): get rid of integer
overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* numeric.c (ruby_num_interval_step_size): check signs and get rid
of implementation dependent behavior of negative division.
[ruby-core:61106] [Bug #9570]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(BIGNUM_EMBED_LEN_NUMBITS): Renamed from RBIGNUM_EMBED_LEN_NUMBITS.
(BIGNUM_EMBED_LEN_MAX): Renamed from RBIGNUM_EMBED_LEN_MAX.
(BIGNUM_SIGN_BIT): Renamed from RBIGNUM_SIGN_BIT.
(BIGNUM_SIGN): Renamed from RBIGNUM_SIGN.
(BIGNUM_SET_SIGN): Renamed from RBIGNUM_SET_SIGN.
(BIGNUM_POSITIVE_P): Renamed from RBIGNUM_POSITIVE_P.
(BIGNUM_NEGATIVE_P): Renamed from RBIGNUM_NEGATIVE_P.
(BIGNUM_EMBED_FLAG): Renamed from RBIGNUM_EMBED_FLAG.
(BIGNUM_EMBED_LEN_MASK): Renamed from RBIGNUM_EMBED_LEN_MASK.
(BIGNUM_EMBED_LEN_SHIFT): Renamed from RBIGNUM_EMBED_LEN_SHIFT.
(BIGNUM_LEN): Renamed from RBIGNUM_LEN.
(RBIGNUM_DIGITS): Renamed from RBIGNUM_DIGITS.
(BIGNUM_LENINT): Renamed from RBIGNUM_LENINT.
* bignum.c: Follow the above change.
* gc.c: Ditto.
* marshal.c: Ditto.
* math.c: Ditto.
* numeric.c: Ditto.
* random.c: Ditto.
* rational.c: Ditto.
* sprintf.c: Ditto.
* ext/-test-/bignum/bigzero.c: Ditto.
* ext/-test-/bignum/intpack.c: Ditto.
* ext/bigdecimal/bigdecimal.c: Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
Patch by @ksss [Fixes GH-522] https://github.com/ruby/ruby/pull/522
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* numeric.c (num_init_copy): preserve encoding of error message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* numeric.c (num_sadded): preserve encoding of error message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* numeric.c (FLOAT_OUT_OF_RANGE): extract a macro and a helper to
raise RangeError of float.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* numeric.c (coerce_failed): preserve encoding of error message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
s/unsgined/unsigned/
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* numeric.c (flo_is_finite_p): prefer C99 standard isfinite() than
deprecated finite().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* numeric.c (finite): disable declaration on Windows, which can be
defined in ruby/win32.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
1L << 63 on 64-bit platform is undefined, at least, according to
ISO/IEC 9899 (C99) 6.5.7.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* internal.h (rb_float_value, rb_float_new): move inline functions
from ruby/ruby.h.
* numeric.c (rb_float_value, rb_float_new): define external functions
for extension libraries.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* numeric.c: use RB_TYPE_P() for special classes instead of switch
with TYPE().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* numeric.c (NUM_STEP_SCAN_ARGS): use positive_int_p() to fix rubyspec
failures.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* numeric.c (NUM_STEP_SCAN_ARGS): remove extra class checks, which
cause the incompatibilities.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* numeric.c (NUM_STEP_GET_INF): split from NUM_STEP_SCAN_ARGS(), since
inf is not used in num_step_size().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* numeric.c (NUM_STEP_SCAN_ARGS): On sencond thought, keep
Numeral#step backward compatible in that it raises TypeError
when nil is given as second argument.
* test/ruby/test_float.rb (TestFloat#test_num2dbl): Revert.
* test/ruby/test_numeric.rb (TestNumeric#test_step): Fix test
cases for the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
* numeric.c (num_step): Default the limit argument to infinity and
allow it to be omitted. Keyword arguments (by: and to:) are
introduced for ease of use. [Feature #8838] [ruby-dev:47662]
[ruby-dev:42194]
* numeric.c (num_step): Optimize for infinite loop.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* parse.y (parser_yylex): calculate denominator directly as powers of
ten, not parsing string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* numeric.c (finite): add declaration for strict ANSI.
[ruby-core:55312] [Bug #8495]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
fix_mul to return an incorrect result for -2147483648*-2147483648
on 64 bit platforms
* test/ruby/test_integer_comb.rb (class TestIntegerComb): add test case
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* include/ruby/intern.h (rb_enumerator_size_func): define strict
function declaration for rb_enumeratorize_with_size().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
RBIGNUM_LEN.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
in rational.c to refer canonicalization state for mathn support.
[ruby-core:41575] [Bug #5736]
* numeric.c (num_quo): ditto.
* test/test_mathn.rb: add a test for the change at r41109.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
rational. [ruby-core:41575] [Bug #5736]
* test/ruby/test_numeric.rb: add a test for the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
[ruby-dev:44710] [Bug #5515]
* test/ruby/test_fixnum.rb: Add an assertion for the above change.
* test/ruby/test_bignum.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See this ticet about RGENGC.
* gc.c: Add several flags:
* RGENGC_DEBUG: if >0, then prints debug information.
* RGENGC_CHECK_MODE: if >0, add assertions.
* RGENGC_PROFILE: if >0, add profiling features.
check GC.stat and GC::Profiler.
* include/ruby/ruby.h: disable RGENGC by default (USE_RGENGC == 0).
* array.c: add write barriers for T_ARRAY and generate sunny objects.
* include/ruby/ruby.h (RARRAY_PTR_USE): added. Use this macro if
you want to access raw pointers. If you modify the contents which
pointer pointed, then you need to care write barrier.
* bignum.c, marshal.c, random.c: generate T_BIGNUM sunny objects.
* complex.c, include/ruby/ruby.h: add write barriers for T_COMPLEX
and generate sunny objects.
* rational.c (nurat_s_new_internal), include/ruby/ruby.h: add write
barriers for T_RATIONAL and generate sunny objects.
* internal.h: add write barriers for RBasic::klass.
* numeric.c (rb_float_new_in_heap): generate sunny T_FLOAT objects.
* object.c (rb_class_allocate_instance), range.c:
generate sunny T_OBJECT objects.
* string.c: add write barriers for T_STRING and generate sunny objects.
* variable.c: add write barriers for ivars.
* vm_insnhelper.c (vm_setivar): ditto.
* include/ruby/ruby.h, debug.c: use two flags
FL_WB_PROTECTED and FL_OLDGEN.
* node.h (NODE_FL_CREF_PUSHED_BY_EVAL, NODE_FL_CREF_OMOD_SHARED):
move flag bits.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
instead of using RARRAY_PTR().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
by Makoto Kishimoto [Bug #8304] [ruby-dev:47280]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bignum.c: ditto
* complex.c: ditto
* dir.c: ditto
* encoding.c: ditto
* enumerator.c: ditto
* numeric.c: ditto
* proc.c: ditto
* re.c: ditto
* string.c: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(MUL_OVERFLOW_FIXNUM_P): Ditto.
(MUL_OVERFLOW_LONG_P): Ditto.
* array.c (rb_ary_product): Don't overflow on signed integer
multiplication.
* numeric.c (fix_mul): Ditto.
(int_pow): Ditto.
* rational.c (f_imul): Ditto.
* insns.def (opt_mult): Ditto.
* thread.c (sleep_timeval): Don't overflow on signed integer addition.
* bignum.c (rb_int2big): Don't overflow on signed integer negation.
(rb_big2ulong): Ditto.
(rb_big2long): Ditto.
(rb_big2ull): Ditto.
(rb_big2ll): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|