Project

General

Profile

Actions

Bug #505

closed

1.upto 2 {|i| p i }

Added by shyouhei (Shyouhei Urabe) over 14 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
Backport:
[ruby-dev:36008]

Description

=begin
いつのまにか1.upto 2 {|i| p i }が通ります。

ruby -ve '1.upto 2 {|i| p i}'
ruby 1.9.0 (2008-08-27 revision 17576) [x86_64-linux]
1
2

1.8では例外です。

ruby -ve '1.upto 2 {|i| p i}'
ruby 1.8.7 (2008-08-12 revision 17572) [x86_64-linux]
-e:1: syntax error, unexpected '{', expecting $end
1.upto 2 {|i| p i}
^
=end


Related issues 3 (0 open3 closed)

Related to Ruby master - Bug #13547: [].delete 1 { 'NG' }ClosedActions
Has duplicate Ruby master - Bug #13691: Word- and symbol array literals not valid where regular array isRejectedActions
Has duplicate Ruby master - Bug #14023: SyntaxError on array argument and blockRejectednobu (Nobuyoshi Nakada)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0