From: Ryan Davis Date: 2009-05-30T06:30:26+09:00 Subject: [ruby-core:23627] Re: AST changes in ruby 1.8.6-p368 On May 26, 2009, at 08:11 , Michael Furr wrote: > > On Tue, 26 May 2009, Nobuyoshi Nakada wrote: > >> At Tue, 26 May 2009 07:30:49 +0900, >> Ryan Davis wrote in [ruby-core:23558]: >>>> failed on input: "if 1..2.a?(b) then\n nil\nend". > [...] >>>> [:call, [:lit, 1], :==, [:array, [:gvar, :$.]]], >>> is the '== $.' part only if range begin is a lit/fixnum? >> >> Yes. > > Would you mind explaining the purpose of this extra method call? > Wouldn't $. be 3 in this case (the last line number parsed) causing > Fixnum#== to return false and thus creating an incorrect Range > literal? [:gvar, :$.], not [:gvar, $.] so it'll be expanded at runtime, not at parse-time. (I hope I understood your question and answered it properly)