Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed specs for wilson's compiler encloser changes

  • Loading branch information...
commit b96974693cee75772b09052f8ec7110a000c2429 1 parent 2a21597
Ryan Davis authored
Showing with 14 additions and 8 deletions.
  1. +1 −0  spec/compiler/call_spec.rb
  2. +13 −8 spec/compiler/scopes_spec.rb
View
1  spec/compiler/call_spec.rb
@@ -245,6 +245,7 @@
gen x do |g|
desc = description do |d|
d.push :self
+ d.push_self_or_class
d.set_encloser
d.push_literal :blah
d.push :self
View
21 spec/compiler/scopes_spec.rb
@@ -253,6 +253,7 @@
gen x do |g|
meth = description do |d|
d.push :self
+ d.push_self_or_class
d.set_encloser
d.push 12
d.sret
@@ -280,6 +281,7 @@
gen x do |g|
desc = description do |d|
d.push :self
+ d.push_self_or_class
d.set_encloser
d.push 12
d.sret
@@ -303,6 +305,7 @@
gen x do |g|
desc = description do |d|
d.push :self
+ d.push_self_or_class
d.set_encloser
d.push 12
d.sret
@@ -327,6 +330,7 @@
gen x do |g|
desc = description do |d|
d.push :self
+ d.push_self_or_class
d.set_encloser
d.push 12
d.sret
@@ -351,6 +355,7 @@
gen x do |g|
desc = description do |d|
d.push :self
+ d.push_self_or_class
d.set_encloser
d.push 1
d.set_local 0
@@ -369,18 +374,19 @@
end
end
-
+
it "compiles a normal module" do
x = [:module, [:colon2, :A], [:scope, [:lit, 12], []]]
-
+
gen x do |g|
desc = description do |d|
d.push :self
+ d.push_self_or_class
d.set_encloser
d.push 12
d.sret
end
-
+
g.open_module :A
g.dup
g.push_literal desc
@@ -391,18 +397,19 @@
g.push_encloser
end
end
-
+
it "compiles a module declared at a path" do
x = [:module, [:colon2, [:const, :B], :A], [:scope, [:lit, 12], []]]
-
+
gen x do |g|
desc = description do |d|
d.push :self
+ d.push_self_or_class
d.set_encloser
d.push 12
d.sret
end
-
+
g.push_const :B
g.open_module_under :A
g.dup
@@ -414,6 +421,4 @@
g.push_encloser
end
end
-
-
end
Please sign in to comment.
Something went wrong with that request. Please try again.