[Nitro] strange syntax in og/entity.rb

George Moschovitis george.moschovitis at gmail.com
Thu Apr 20 06:33:59 EDT 2006


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




More information about the Nitro-general mailing list