summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-03 01:33:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-03 01:33:58 +0000
commit6660c5fb0cb9dc5aa430765c958cec5b4bda5e58 (patch)
tree61d8e07ea38adb4a2b8e7b5f900c2713877d3074 /parse.y
parent4c009414119347e87d9bb2402617a4585dd3f341 (diff)
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.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index c2f5cf04fc..f392be7bfa 100644
--- a/parse.y
+++ b/parse.y
@@ -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);