[MacRuby-devel] unrecognised defined?
Laurent Sansonetti
lsansonetti at apple.com
Wed Sep 16 19:16:30 PDT 2009
Hi Ben,
This is a missing feature in the compiler, in the way we compile the
defined? expression.
It's easily reproducible here:
$ ./miniruby -e 'p (defined? FOO && 42)'
unrecognized defined? arg: 21 (NODE_AND)Abort trap
I filed a test_vm case.
Now, it looks like the code you found this problem is bugged.
if defined? RUBY_ENGINE && RUBY_ENGINE == 'jruby'
should probably be written as
if (defined? RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
otherwise, it seems to be the equivalent of
if defined?(RUBY_ENGINE && RUBY_ENGINE == 'jruby')
which is probably not what the code wants to do.
Laurent
On Sep 16, 2009, at 5:01 PM, Ben Schwarz wrote:
> Hey folks,
>
> After installing the 'grit' gem I required' it in macirb and
> received the following:
>
> ben at Homeslice ~ Ϟ macirb
> irb(main):001:0> require 'grit'
> unrecognized defined? arg: 21 (NODE_AND)fish: Job 1, 'macirb'
> terminated by signal SIGABRT (Abort)
>
>
> Which, I believe is responding to line 12 in grit.rb – http://github.com/mojombo/grit/blob/master/lib/grit.rb#L
> 12
> Is this a bug that should be logged? I've tried defined? RUBY_ENGINE
> in macirb and it appears to execute without a problem
>
> Cheers,
>
>
> --
>
> Ben Schwarz
> Web architect
>
> Web: http://www.germanforblack.com
>
> --
> Please consider your environment before printing or distributing
> this material.
> --
>
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
More information about the MacRuby-devel
mailing list