Re: Upgrading Asciidoctor.js to the latest version of Asciidoctor
Posted by
ggrossetie on
Oct 19, 2013; 10:15pm
URL: https://discuss.asciidoctor.org/Upgrading-Asciidoctor-js-to-the-latest-version-of-Asciidoctor-tp636p826.html
Hi,
I'm stuck with an error and I don't know how to handle this case.
The warn method from the Kernel module is not found by Opal:
Uncaught NoMethodError: undefined method `warn' for Asciidoctor::Lexer
I tried to add "require 'kernel'" to solve this issue and it nearly worked... but then Opal mixed up definition of methods. For example the =~ method now use the implementation of the Kernel module (opal/corelib/kernel.rb) instead of the implementation of the String class or Regexp class :
module Kernel
# ...
def =~(obj)
false
end
end
# ...
Any idea ? Maybe it's some kind of "bug" or limitation in Opal ?
To move on I commented out all usage of the warn method :/
Cheers,
Guillaume