24 Nov 2013, 05:29
Duck_pragsmall

Eito Katagiri (1 post)

I am trying to run an example on page 54, but I get following error.

$ ruby mischief.rb
NoMethodError: undefined method `add_class_annotation' for Mischief:Class
  (root) at mischief.rb:11

Has this changed in newer version? My environment is:

$ ruby -v
jruby 1.7.8 (1.9.3p392) 2013-11-14 0ce429e on Java HotSpot(TM) 64-Bit Server VM 1.6.0_65-b14-462-11M4609 [darwin-x86_64]
$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
$ uname -a
Darwin <masked>.local 13.0.2 Darwin Kernel Version 13.0.2: Sun Sep 29 19:38:57 PDT 2013; root:xnu-2422.75.4~1/RELEASE_X86_64 x86_64
25 Nov 2013, 00:52
Mr_sketchy_pragsmall

Ian Dees (195 posts)

Hello, Katagiri-san.

I am sorry about the error. I am able to replicate it on my machine as well. Something must indeed have changed in JRuby, but the API documents still seem to say this should work.

I have written my co-authors to ask if they have any suggestions here.

Sincerely,

Ian Dees

  You must be logged in to comment