Skip to content

Commit

Permalink
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion corelib/kernel.rb
Original file line number Diff line number Diff line change
@@ -103,7 +103,9 @@ def dup
%x{
for (var name in #{self}) {
if (name.charAt(0) !== '$') {
copy[name] = #{self}[name];
if (name !== '_id' && name !== '_klass') {
copy[name] = #{self}[name];
}
}
}
}
4 changes: 2 additions & 2 deletions lib/opal/nodes/call.rb
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ class CallNode < Base

def compile
# if we handle this call specially, just do that and return early
return if self.handle_special
return if self.handle_special_call

compiler.method_calls << meth.to_sym

@@ -82,7 +82,7 @@ def using_irb?
# Handle "special" method calls, e.g. require(). Subclasses can override
# this method. If this method returns nil, then the method will continue
# to be generated by CallNode.
def handle_special
def handle_special_call
if respond_to? "handle_#{meth}"
push __send__("handle_#{meth}")
return true
3 changes: 3 additions & 0 deletions stdlib/thread.rb
Original file line number Diff line number Diff line change
@@ -15,3 +15,6 @@ def []=(key, val)
@vars[key] = val
end
end

class Queue
end
4 changes: 2 additions & 2 deletions tasks/mspec.rake
Original file line number Diff line number Diff line change
@@ -7,9 +7,9 @@ require 'opal-sprockets'
# 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
alias_method :mspec_handle_special, :handle_special
alias_method :mspec_handle_special, :handle_special_call

def handle_special
def handle_special_call
if meth == :language_version and scope.top?
lang_type = arglist[2][1]
target = "rubyspec/language/versions/#{lang_type}_1.9"

0 comments on commit d453167

Please sign in to comment.