diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-08-03 01:33:58 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-08-03 01:33:58 +0000 |
commit | 6660c5fb0cb9dc5aa430765c958cec5b4bda5e58 (patch) | |
tree | 61d8e07ea38adb4a2b8e7b5f900c2713877d3074 /parse.y | |
parent | 4c009414119347e87d9bb2402617a4585dd3f341 (diff) | |
download | ruby-6660c5fb0cb9dc5aa430765c958cec5b4bda5e58.tar.gz |
parse.y: no reduction with 1
* parse.y (parser_set_integer_literal): use rb_rational_raw1() for
integral rational because no reduction is needed with 1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -6428,7 +6428,7 @@ parser_set_integer_literal(struct parser_params *parser, VALUE v, int suffix) { int type = tINTEGER; if (suffix & NUM_SUFFIX_R) { - v = rb_rational_new(v, INT2FIX(1)); + v = rb_rational_raw1(v); type = tRATIONAL; } return set_number_literal(v, type, suffix); |