Project

General

Profile

Actions

Bug #9726

closed

Incorrect Proc parsing

Added by svladb (Vladimir Smelyansky) almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]
[ruby-core:61950]

Description

There seems to be issue in parsing with white space:

The code below works:

proc_issue (Proc.new { |n|
  "Do something"
})

That code causing parsing error (removing white space makes it working proc_issue (Proc..)

proc_issue (Proc.new do |n|
  "Do something"
end)

Updated by nobu (Nobuyoshi Nakada) almost 10 years ago

  • Description updated (diff)

Updated by nobu (Nobuyoshi Nakada) almost 10 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r45637.


parse.y: allow parenthesed do-block in cmdarg

  • parse.y (primary): flush cmdarg flags inside left-paren in a
    command argument, to allow parenthesed do-block as an argument
    without arguments parentheses. [ruby-core:61950] [Bug #9726]

Updated by nobu (Nobuyoshi Nakada) almost 10 years ago

  • Status changed from Closed to Open
  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN to 2.0.0: REQUIRED, 2.1: REQUIRED

Updated by nobu (Nobuyoshi Nakada) almost 10 years ago

  • Status changed from Open to Closed

Accidentally reopened.
close.

Updated by nagachika (Tomoyuki Chikanaga) almost 10 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE

r45637 was backported into ruby_2_1 branch at r45929.

Updated by usa (Usaku NAKAMURA) almost 10 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: DONE to 2.0.0: DONE, 2.1: DONE

backported into ruby_2_0_0 at r46509.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0