summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-13 11:00:28 (GMT)
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-13 11:00:28 (GMT)
commit606d6b34706c590fe0449b0c160281e729be0484 (patch)
tree7e95a9e7da6913fde1d89a51a31a38c5e5297f4b /compile.c
parent4f4ed3e9eaea5c90c23c1bbfb7c1ff08331ad18a (diff)
Revert "range.c: prohibit `(1..nil)`"
This reverts commit a44c010764a16ae09aaed49d76eec055ca0057c8. Refs #14845. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index 2caf92e..2197183 100644
--- a/compile.c
+++ b/compile.c
@@ -7188,10 +7188,10 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, in
case NODE_DOT2:
case NODE_DOT3:{
int excl = type == NODE_DOT3;
+ VALUE flag = INT2FIX(excl);
const NODE *b = node->nd_beg;
const NODE *e = node->nd_end;
- VALUE flag = INT2FIX(excl | (e ? 0 : 2));
- if (number_literal_p(b) && e && number_literal_p(e)) {
+ if (number_literal_p(b) && number_literal_p(e)) {
if (!popped) {
VALUE val = rb_range_new(b->nd_lit, e->nd_lit, excl);
iseq_add_mark_object_compile_time(iseq, val);