[Nitro] strange syntax in og/entity.rb

Michael Fellinger m.fellinger at gmail.com
Thu Apr 20 09:38:22 EDT 2006


yeah, but the problem is non-closurei.e.%{} finds { and } in between and just ignores them until the final }%|| just breaks with | in between...same goes for %~~ when a ~ is in there... so we should better staywith %{} %() or %[]
On 4/20/06, George Moschovitis <george.moschovitis at gmail.com> wrote:> You can use any character for strings... ie>> %{}, %||, %[], %~~, etc etc...>> -g.>> On 4/20/06, Michael Fellinger <manveru at weez.co.jp> wrote:> > IMHO you are absolutly right, it should better be:> >> > %{#{field_name} #{options.delete("#{name}_op".to_sym) || '='}> > #{ogmanager.store.quote(value)}}> >> > and %|| is a string, according to irb at least> >> > On Thursday 20 April 2006 18:37, Stephan Walter wrote:> > > Hi,> > >> > > while digging around in the Og code, I found this in og/entity.rb, line> > > 598, private method "finder":> > >> > > %|#{field_name} #{options.delete("#{name}_op".to_sym) || '='}> > > #{ogmanager.store.quote(value)}|> > >> > > I couldn't find anything in the ruby docs, but I would guess that the> > > %|...| will evaluate the string it contains. Is that correct? If yes, I> > > see a problem that the string itself contains pipes.> > >> > > -Stephan> > >> > > _______________________________________________> > > Nitro-general mailing list> > > Nitro-general at rubyforge.org> > > http://rubyforge.org/mailman/listinfo/nitro-general> > _______________________________________________> > Nitro-general mailing list> > Nitro-general at rubyforge.org> > http://rubyforge.org/mailman/listinfo/nitro-general> >>>> --> http://www.gmosx.com> http://www.navel.gr> http://www.nitrohq.com>> _______________________________________________> Nitro-general mailing list> Nitro-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/nitro-general>



More information about the Nitro-general mailing list