From: "Eregon (Benoit Daloze)" Date: 2013-05-08T05:03:13+09:00 Subject: [ruby-core:54854] [ruby-trunk - Feature #8377] Deprecate :: for method calls in 2.1 Issue #8377 has been updated by Eregon (Benoit Daloze). Hanmac (Hans Mackowiak) wrote: > i am against that, what about methods that are defined in Kernel, but you want when you are inside an BasicObject? > you need something like: > Kernel::Array([]) > or > Kernel.Array([]) > what does make more sense for you? You need :: before Kernel, unless you define const_get ::Kernel::Array(3) And in that case I much prefer ::Kernel.Array(3) even if it does not look as nice because at least is is clear :: is constant resolution. This is a weird case due to the upper case first letter, what do you think about: ::Kernel::puts "Hello" versus ::Kernel.puts "Hello" ---------------------------------------- Feature #8377: Deprecate :: for method calls in 2.1 https://bugs.ruby-lang.org/issues/8377#change-39184 Author: charliesome (Charlie Somerville) Status: Open Priority: Normal Assignee: Category: Target version: current: 2.1.0 =begin (({::})) is usually a constant lookup operator, but it can also be used to call methods. This can confusing to people learning Ruby. I propose deprecating (({::})) as a method call operator in Ruby 2.1, then removing it in 2.2 (or whichever version comes after 2.1). As part of the deprecation, Ruby's parser should emit a warning whenever (({::})) is used as a method call operator. This warning should be emitted even if (({-w})) is not enabled. =end -- http://bugs.ruby-lang.org/