Created
May 24, 2011 17:43
-
-
Save matthewd/989228 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/compiler/ast/sends.rb b/lib/compiler/ast/sends.rb | |
index 6707b05..0f5851e 100644 | |
--- a/lib/compiler/ast/sends.rb | |
+++ b/lib/compiler/ast/sends.rb | |
@@ -2,6 +2,7 @@ module Rubinius | |
module AST | |
class Send < Node | |
attr_accessor :receiver, :name, :privately, :block, :variable | |
+ attr_accessor :vcall_style | |
attr_accessor :check_for_local | |
def initialize(line, receiver, name, privately=false, vcall_style=false) | |
@@ -40,6 +41,10 @@ module Rubinius | |
end | |
def value_defined(g, f) | |
+ if @vcall_style and check_local_reference(g) | |
+ return bytecode(g) | |
+ end | |
+ | |
# Save the current exception into a stack local | |
g.push_exception_state | |
outer_exc_state = g.new_stack_local | |
diff --git a/lib/compiler/ast/variables.rb b/lib/compiler/ast/variables.rb | |
index 5a540b3..d02dd7a 100644 | |
--- a/lib/compiler/ast/variables.rb | |
+++ b/lib/compiler/ast/variables.rb | |
@@ -528,6 +528,7 @@ module Rubinius | |
class MultipleAssignment < Node | |
attr_accessor :left, :right, :splat, :block | |
+ attr_accessor :empty_splat | |
def initialize(line, left, right, splat) | |
@line = line | |
@@ -554,6 +555,8 @@ module Rubinius | |
end | |
elsif splat and @fixed | |
@splat = EmptySplat.new line, right.body.size | |
+ elsif splat | |
+ @empty_splat = splat | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment