From: sawadatsuyoshi@... Date: 2014-10-20T11:32:52+00:00 Subject: [ruby-core:65810] [ruby-trunk - Bug #10406] [Open] Method starting with a capital is not detected when parentheses and receiver are omitted Issue #10406 has been reported by Tsuyoshi Sawada. ---------------------------------------- Bug #10406: Method starting with a capital is not detected when parentheses and receiver are omitted https://bugs.ruby-lang.org/issues/10406 * Author: Tsuyoshi Sawada * Status: Open * Priority: Normal * Assignee: * Category: * Target version: * ruby -v: 2.1.3 * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- A method whose name starts with a capital is not detected when parentheses and receiver are omitted. ~~~ruby def Foo; puts "foo" end Foo # => uninitialized constant Foo ~~~ If I disambiguate it as a method, then the method is detected: ~~~ruby Foo() # => foo ~~~ This kind of consideration if unnecessary if the method name does not start with a capital. ~~~ruby def foo; puts "foo" end foo # => foo ~~~ So I expect method `Foo` to be detected without explicit receiver and arguments (unless there is a constant with the same name). ~~~ruby def Foo; puts "foo" end ~~~ I first thought this as a bug. If it is not a bug, then I would like to ask this as a feature request. -- https://bugs.ruby-lang.org/