Skip to content


Make sure special calls are only skipped when they match their requir…
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Oct 27, 2013
1 parent 1c052ec commit a3f011d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 3 additions & 1 deletion lib/opal/nodes/call.rb
Expand Up @@ -92,8 +92,10 @@ def using_irb?
# to be generated by CallNode.
def handle_special
if SPECIALS.include? meth
push __send__("handle_#{meth}")
if result = __send__("handle_#{meth}")
push result
return true

Expand Down
6 changes: 2 additions & 4 deletions tasks/mspec.rake
Expand Up @@ -2,11 +2,9 @@ require 'rack'
require 'webrick'
require 'opal-sprockets'

# rubyspec uses a top level "language_version" to require relative specs.
# We can't do this at runtime, so we hijack the method (and make sure we only
# do this at the top level). We figure out which file we are including, and
# add it to our require list
class Opal::Nodes::CallNode
# Rubyspec uses this call to load in language specific features at runtime.
# We can't do this at runtime, so handle it during compilation
add_special :language_version do
if meth == :language_version and
lang_type = arglist[2][1]
Expand Down

0 comments on commit a3f011d

Please sign in to comment.