KOBAYASHI Shuji
549317a36b
Fix Fixnum overflow test in Integer#<< test
...
- Skip when `MRB_WITHOUT_FLOAT` is defined.
- Make `Fixnum` overflow even when `MRB_INT64` is defined.
2019-09-23 21:59:35 +09:00
KOBAYASHI Shuji
2f7175442f
Fix Fixnum#(to_s|inspect) argument specs
...
Before this patch:
$ bin/mruby -e 'p 3.to_s(2)'
trace (most recent call last):
[0] -e:1
-e:1: 'to_s': wrong number of arguments (1 for 0) (ArgumentError)
After this patch:
$ bin/mruby -e 'p 3.to_s(2)'
"11"
2019-09-17 09:28:51 +09:00
KOBAYASHI Shuji
de5da4b7f6
Fix coercing for first step counter in Numeric#step
...
Before:
a=[]; 7.step(4, -3.0) { |c| a << c }; p a #=> [7, 4.0]
After / Ruby:
a=[]; 7.step(4, -3.0) { |c| a << c }; p a #=> [7.0, 4.0]
2019-01-15 21:41:54 +09:00
Yukihiro "Matz" Matsumoto
cca19532c5
Remove Kernel#class_defined? which is not available in CRuby; #3829
2019-01-03 11:34:35 +09:00
YAMAMOTO Masaya
dcd5d0ffec
Test for MRB_WITHOUT_FLOAT
2017-10-11 17:58:11 +09:00
Zachary Scott
3f228c1da4
Fix "ambiguous first argument" warning
2015-12-17 00:12:19 +09:00
murase_syuka
ef95dcd390
Bugfix nagative-number lshift() bit overflow
2015-11-18 21:37:17 +09:00
murase_syuka
a4d5588101
Bugfix lshift() bit overflow; close #3023
2015-11-18 01:00:46 +09:00
Yukihiro "Matz" Matsumoto
3a462fe468
Integer << and >> to use Float instead of raising RangeError
2015-09-02 23:41:51 +09:00
Miura Hideki
eb3af3752f
Fix to avoid warning
2015-04-17 20:04:07 +09:00
Miura Hideki
a21d3f627e
Add test of negative arguments for Integer#%
2015-04-17 17:26:12 +09:00
take_cheeze
ec5b055694
Move direct superclass checking to test/t/superclass.rb.
2014-06-15 15:02:21 +09:00
yui-knk
b9e9ce9237
Add ISO No. to Integer#divmod test.
2014-05-14 08:48:04 +09:00
Yukihiro "Matz" Matsumoto
15a2003aeb
Merge pull request #2190 from cremno/mrbtest-mrb_int-constants
...
test fixnum overflow for add, sub and mul
2014-05-13 18:16:52 +09:00
yui-knk
935a4ccce7
Fix ISO No.
2014-05-13 09:48:02 +09:00
cremno
964ce6e327
test fixnum overflow for add, sub and mul
2014-05-05 00:19:08 +02:00
Yukihiro "Matz" Matsumoto
e4ae3bf661
Merge pull request #1871 from ksss/numeric-plus
...
fix bug when `0 + other object`
2014-03-17 00:14:42 +09:00
ksss
9dcce29749
fix bug when 0 * other object
2014-03-16 23:08:31 +09:00
ksss
e9f3dca0f4
fix bug when 0 + other object
2014-03-16 22:52:25 +09:00
Tomoyuki Sahara
6e1f4695aa
add tests for Integer#divmod.
2014-03-04 10:51:56 +09:00
Jun Hiroe
19dce63a2d
I fix order of actual and expect test value in integer.rb.
2013-08-02 20:54:22 +09:00
Carson McDonald
1d27d4e03f
Add a few more shift tests
2013-07-06 08:53:40 -04:00
Daniel Bovensiepen
b55958b4fa
Improve Integer Tests
2013-06-15 00:11:12 +08:00
Daniel Bovensiepen
b4647224b7
Add test case for Integer#step
2012-09-15 17:13:56 +09:00
Daniel Bovensiepen
0c2d74020a
Add more superclass tests
2012-06-03 23:31:53 +08:00
Daniel Bovensiepen
31e9705022
Add Test cases for Literals, Enumeration, Exceptions and clean line endings
2012-05-29 01:20:46 +08:00
Yukihiro Matsumoto
52b2d092d3
test t/*.rb spacing fix
2012-05-23 12:00:49 +09:00
Daniel Bovensiepen
2331738c21
Complete Integer Tests for ISO
2012-05-19 00:44:43 +08:00
Daniel Bovensiepen
241d3f7eb3
Add Tests for Integer
2012-05-16 11:18:42 -07:00