I have run into a problem using Cucumber with a Merb app (see
http://pastie.org/405651 for details).  The gist of it is that
find() is being called with a Pathname, which it then tries to
subscript, in order to check the first byte:

  def self.find(file, *options, &block)
    extensions  = @registrations.keys*","

    is_absolute = file[0] == File::SEPARATOR     ||
                  file[0] == File::ALT_SEPARATOR ||
                  file    =~ /\A[A-Z]:\\/i
    ...


This blows up, as follows:

  .../gems/polyglot-0.2.4/lib/polyglot.rb:16:in `find':
    undefined method `[]' for #<Pathname:0x261de04> (NoMethodError)

I have worked around the problem by coercing file to a string:

  def self.find(file, *options, &block)
    file = file.to_s
    ...


However, I'd like to get a determination of who's doing what that
they shouldn't be, so an appropriate bug report can be filed.

-r
-- 
http://www.cfcl.com/rdm            Rich Morin
http://www.cfcl.com/rdm/resume     [email protected]
http://www.cfcl.com/rdm/weblog     +1 650-873-7841

Technical editing and writing, programming, and web development

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to