Ok... can I say that a method in upercase with no arguements can't be
called?

2.1.2 :010 > def Aja(*args)
2.1.2 :011?>   puts 'aja'
2.1.2 :012?>   end
 => :Aja
2.1.2 :013 > Aja
NameError: uninitialized constant Aja
    from (irb):13
    from /home/juanjo/.rvm/rubies/ruby-2.1.2/bin/irb:11:in `<main>'
2.1.2 :014 > Aja 1
aja
 => nil



2014-07-20 23:46 GMT-03:00 Abinoam Jr. <abinoam / gmail.com>:

> Dear Juanjo Conti,
>
> def UPCASEMETHODISNOTAPROBLEM(arg)
>   puts arg
> end
>
> UPCASEMETHODISNOTAPROBLEM "although not recommended"
>
> Abinoam Jr.
>
>
>
> On Sun, Jul 20, 2014 at 11:09 PM, Juanjo Conti <jjconti / gmail.com> wrote:
> > I got it!
> >
> > A can't be a method, because it's upcase!
> >
> >
> > 2014-07-19 23:10 GMT-03:00 Ryan Davis <ryand-ruby / zenspider.com>:
> >
> >>
> >> On Jul 19, 2014, at 18:50, Juanjo Conti <jjconti / gmail.com> wrote:
> >>
> >> > Right, thanks. But why that is not happening with a +"B"?
> >>
> >> Because you've already taught the interpreter that 'a' is a local
> >> variable, so it knows it isn't `a(+"B")`, but `a + "B"`:
> >>
> >> >> pp RubyParser.new.parse "a = 'a'; a +B"
> >> s(:block,
> >>  s(:lasgn, :a, s(:str, "a")),
> >>  s(:call, s(:lvar, :a), :+, s(:const, :B)))
> >>
> >
> >
> >
> > --
> > Juanjo Conti
> > blog: http://www.juanjoconti.com.ar
>



-- 
Juanjo Conti
blog: http://www.juanjoconti.com.ar