[Nitro] Facets 1.4.2

Bryan Soto bryan.a.soto at gmail.com
Wed Jun 21 19:40:34 EDT 2006


On 6/21/06, TRANS <transfire at gmail.com> wrote:
> On 6/21/06, Bryan Soto <bryan.a.soto at gmail.com> wrote:
> > lib/facets/core/module/basename.rb:20
> >
> > def basename
> > +  if self.name and not self.name.empty?
> > -   if self.name
> >
> > It seems that mod.name is returning "" (empty string), not nil. Please
> > make as elegant as you wish. :)
>
> Yea, but self.name returns "" too, so maybe basnema should do the
> same. If you look at waht it returns when fixed, like you show, then
> the basename is something like:
>

Actually, that was a typo on my part from jumping back and forth
between paramix.rb and basename.rb. I meant self.name rather than
mod.name in the above.

The error was due to '' (empty string) being converted to a symbol in
the define_method call, so I think you have to return a string that
can be converted to a symbol. That's probably why generated the string
based off of inspect below.

>   Module_0xb7cd02cc
>
> See any problems with that. Could you test that?
>

First off, there's a missing method, basename?. I went with
# paramix.rb
mixin_parameters[mod] = params
+ unless mod.basename.to_s.empty?
- if mod.basename?

at the moment and am back to fixing requires as I'm activating an
older version of facets. I'll let you know how it goes.

Bryan



More information about the Nitro-general mailing list