Yukihiro "Matz" Matsumoto
ccf28775b8
Fix mrb_str_len_to_dbl to support Hexadecimal like 0x10.
2020-01-06 15:52:39 +09:00
KOBAYASHI Shuji
7192429e83
Fix behavior of Kernel#Integer to numbers ending with _ and spaces
...
#### Before this patch:
```ruby
Integer("1_ ") #=> 1
```
#### After this patch (same as Ruby):
```ruby
Integer("1_ ") #=> ArgumentError
```
2019-12-11 16:40:39 +09:00
KOBAYASHI Shuji
bf431e77b8
Fix behavior of String#to_i/Kernel#Integer to numbers starting with _
...
#### Before this patch:
```ruby
Integer("_1") #=> 1
"_1".to_i #=> 1
```
#### After this patch (same as Ruby):
```ruby
Integer("_1") #=> ArgumentError
"_1".to_i #=> 0
```
2019-12-10 21:31:30 +09:00
KOBAYASHI Shuji
0893ee492c
Fix that String#to_f accepts consecutive _ as a numeric expression
...
Consecutive `_` is not allowed as a numeric expression:
1_2__3 #=> SyntaxError
Float("1_2__3") #=> ArgumentError
Integer("1_2__3") #=> ArgumentError
"1_2__3".to_i #=> 12
But `String#to_f` accept it, so I fixed the issue.
Before this patch:
"1_2__3".to_f #=> 123
After this patch:
"1_2__3".to_f #=> 12
2019-12-09 21:47:59 +09:00
KOBAYASHI Shuji
1975dedb21
Use mrb_string_value_cstr in mrb_str_to_dbl
2019-05-08 20:35:03 +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
b70d69de09
Support MRB_WIHTOUT_FLOAT to mruby-kernel-ext
2017-10-16 18:15:47 +09:00
Yukihiro "Matz" Matsumoto
d2458e66c2
Remove class info from backtrace lines.
2017-05-23 23:50:42 +09:00
ksss
b1c5c3b0a5
Fix lost lineno
2017-03-25 15:56:27 +09:00
ksss
59d9f313df
Skip when backtrace doesn't get
2017-01-14 22:01:20 +09:00
ksss
6f9cb7406a
Implement Kernel.#caller
2017-01-14 22:01:20 +09:00
Syohei YOSHIDA
2a661ac612
Add tests which passes all zero string to Kernel#Integer
2016-01-14 11:05:03 +09:00
Jun Hiroe
28c804621a
Add Kernel.Integer
2014-10-29 01:30:30 +09:00
Jun Hiroe
140e9bbf4b
Add Kernel.Float
2014-10-24 01:55:55 +09:00
Jun Hiroe
9e05366451
Add Kernel.Hash
2014-10-21 23:48:44 +09:00
Jun Hiroe
de04d3f080
Add Kernel.String
2014-10-20 22:35:58 +09:00
Jun Hiroe
b6edf24a01
Add Kernel.Array
2014-10-19 19:25:31 +09:00
take_cheeze
d0c0beb880
Move __method__ to mruby-kernel-ext since it's not ISO method.
2014-05-09 22:44:10 +09:00
take_cheeze
208bafba2d
Move Kernel#fail definition to mruby-kernel-ext mrbgem.
2014-05-07 00:01:30 +09:00