Strange error message on MessageNotUnderstood

6 views
Skip to first unread message

Patru

unread,
Dec 24, 2011, 9:49:40 AM12/24/11
to MagLev Discussion
As I try to go (Mini-)Test first I regularly build test methods that
call things that "are not there yet". Compared with MRI ruby Maglev
produces very strange error messages at this point, I get for example

NoMethodError: a MessageNotUnderstood occurred (error 2010), a
UndefinedObject does not understand #'do:'
/Users/patru/Projects/Soft-Werker/invoice/test/invoice_test.rb:47

which at least has a decent StackTrace. However, the error message is
less than telling, as there should not be UndefinedObjects and there
certainly is no 'do:' message (which look SmallTalkisch btw). calling
up a quick irb session on ree I get

ruby-1.8.7-p302 :001 > class Test
ruby-1.8.7-p302 :002?> end
=> nil
ruby-1.8.7-p302 :003 > Test.hello
NoMethodError: undefined method `hello' for Test:Class

where maglev-irb produces

maglev-head :001 > class Test
maglev-head :002?> end
=> nil
maglev-head :003 > Test.hello
NoMethodError: a MessageNotUnderstood occurred (error 2010), a
UndefinedObject does not understand #'do:'
from (irb):4:in `__compileEval'
...

which is not really telling as above.

Is there a way to improve on this?

Jesse Cooke

unread,
Dec 24, 2011, 3:16:03 PM12/24/11
to maglev-d...@googlegroups.com
This is a bug, which has been noted: https://github.com/MagLev/maglev/issues/116
Thanks Patru!

--------------------------------------------
Jesse Cooke :: N-tier Engineer
jc00ke.com / @jc00ke



--
You received this message because you are subscribed to the Google Groups "MagLev Discussion" group.
To post to this group, send email to maglev-d...@googlegroups.com.
To unsubscribe from this group, send email to maglev-discuss...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/maglev-discussion?hl=en.


Jesse Cooke

unread,
Dec 24, 2011, 4:51:53 PM12/24/11
to maglev-d...@googlegroups.com

PS: what exact version of MagLev are you using? Note the differences in error messages between your example & what HEAD displays.

@jc00ke
n-tier engineer

Patru

unread,
Dec 24, 2011, 8:38:12 PM12/24/11
to MagLev Discussion
I used whatever rvm gave me, it then said maglev-head in irb. I just
reinstalled maglev with

rvm get head
rvm install maglev

on my Mac (OS X Lion)
(which of course gave me a new stone and let me discover a few
problems with my class initial loads)
and I now get

maglev-1.0.0 :001 > class Test
maglev-1.0.0 :002?> end
=> nil
maglev-1.0.0 :003 > Test.new.hello
NoMethodError: NoMethodError: undefined method `hello' for Test

for instance methods and

maglev-1.0.0 :004 > Test.hello
NoMethodError: a MessageNotUnderstood occurred (error 2010), a
UndefinedObject does not understand #'do:'
from (irb):5:in `__compileEval'

for singleton methods which looks pretty similar to what I got before
(seems to be the same one conradwt got on github). As for my version,
maglev version now says

maglev 1.0.0 (ruby 1.8.7) (2011-10-31 rev 1.0.0-27184)[Darwin x86_64]

is that what you wanted to know? I may be a little behind as rvm will
probably not update as quickly as a separate clone from github. Do you
recommend the latter?

Jesse Cooke

unread,
Dec 24, 2011, 8:45:28 PM12/24/11
to maglev-d...@googlegroups.com
I've had good luck with HEAD as the bugs we find can be fixed. I don't know when MagLev 1.0.1 will drop ;-) 


On 24 Dez., 22:51, Jesse Cooke <je...@jc00ke.com> wrote:
> PS: what exact version of MagLev are you using? Note the differences in
> error messages between your example & what HEAD displays.
>
> @jc00ke
> n-tier engineer
> On Dec 24, 2011 12:16 PM, "Jesse Cooke" <je...@jc00ke.com> wrote:
>
>
>
>
>
>
>
> > This is a bug, which has been noted:
> >https://github.com/MagLev/maglev/issues/116
> > Thanks Patru!

Reply all
Reply to author
Forward
0 new messages