to_i$B$H(Bto_f$B$N0l4S@-(B

e$B$k$S$-$A$G$9!#e(B

String#to_ie$B$He(BString#to_fe$B$GO"B3$7$?e(B_e$B$N07$$$K0c$$$,$"$j$^$9!#e(B

RUBY_VERSION # => “1.9.0”
[ “+1_1__2”.to_i, “+1_1__2”.to_f ] # => [11, 112.0]
Integer("+1_1__2") rescue $! # => #<ArgumentError: invalid value for
Integer: “+1_1__2”>
Float("+1_1__2") rescue $! # => #<ArgumentError: invalid value for
Float(): “+1_1__2”>