rational.c: preserve encoding in exception
* rational.c (string_to_r_strict): preserve encoding in exception git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
731c9288da
commit
bc8dfdc059
@ -1,3 +1,7 @@
|
|||||||
|
Sat Sep 12 05:35:24 2015 Eric Wong <e@80x24.org>
|
||||||
|
|
||||||
|
* rational.c (string_to_r_strict): preserve encoding in exception
|
||||||
|
|
||||||
Fri Sep 11 20:23:35 2015 Koichi Sasada <ko1@atdot.net>
|
Fri Sep 11 20:23:35 2015 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* vm_core.h: remove rb_call_info_t::aux.opt_pc.
|
* vm_core.h: remove rb_call_info_t::aux.opt_pc.
|
||||||
|
@ -2327,9 +2327,8 @@ string_to_r_strict(VALUE self)
|
|||||||
s = (char *)"";
|
s = (char *)"";
|
||||||
|
|
||||||
if (!parse_rat(s, 1, &num)) {
|
if (!parse_rat(s, 1, &num)) {
|
||||||
VALUE ins = f_inspect(self);
|
rb_raise(rb_eArgError, "invalid value for convert(): %+"PRIsVALUE,
|
||||||
rb_raise(rb_eArgError, "invalid value for convert(): %s",
|
self);
|
||||||
StringValuePtr(ins));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RB_TYPE_P(num, T_FLOAT))
|
if (RB_TYPE_P(num, T_FLOAT))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user