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 | |
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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | parse.y | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Sat Aug 3 10:33:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * parse.y (parser_set_integer_literal): use rb_rational_raw1() for + integral rational because no reduction is needed with 1. + Sat Aug 3 09:46:07 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/etc/etc.c (setup_passwd, setup_group): set proper encodings to @@ -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); |