Project

General

Profile

Actions

Bug #9416

closed

'private def' results in syntax errors in the method

Added by rits (First Last) almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:<unknown>]

Description

class Class1
  private def foo
    [1, 2].each do |e|
      p e
    end
  end
end

Class1.new.send :foo

syntax error, unexpected keyword_do_block, expecting keyword_end
    [1, 2].each do |e|
                  ^

Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #9308: def's return value causes errorsClosed12/27/2013Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0