summaryrefslogtreecommitdiffhomepage
path: root/src/error.c
diff options
context:
space:
mode:
authorKOBAYASHI Shuji <[email protected]>2019-12-09 21:47:59 +0900
committerKOBAYASHI Shuji <[email protected]>2019-12-09 21:47:59 +0900
commit0893ee492c189e4d2c5badfd326a2e45049c89a5 (patch)
tree94a9d96b616d91deb2876ef3b9c9e84eb35a613e /src/error.c
parent8267993988971a7797cdc8a5c6d161f3355f1af2 (diff)
downloadmruby-0893ee492c189e4d2c5badfd326a2e45049c89a5.tar.gz
mruby-0893ee492c189e4d2c5badfd326a2e45049c89a5.zip
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
Diffstat (limited to 'src/error.c')
0 files changed, 0 insertions, 0 deletions