Login  Register

Re: Upgrading Asciidoctor.js to the latest version of Asciidoctor

Posted by LightGuardjp on Oct 19, 2013; 10:27pm
URL: https://discuss.asciidoctor.org/Upgrading-Asciidoctor-js-to-the-latest-version-of-Asciidoctor-tp636p827.html

Yep, I'd say this is a bug in Opal. warn has been around for quite a while (it's in 1.8).

On Sat, Oct 19, 2013 at 4:16 PM, ggrossetie [via Asciidoctor :: Discussion] <[hidden email]> wrote:
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


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Upgrading-Asciidoctor-js-to-the-latest-version-of-Asciidoctor-tp636p826.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Jason Porter
http://en.gravatar.com/lightguardjp