Skip to content

Commit

Permalink
rewrote 2 specs so that they pass under both 1.8 and 1.9 (because con…
Browse files Browse the repository at this point in the history
…st lookup is different)

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@2362 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information
lrz committed Aug 24, 2009
1 parent 6a7be99 commit a745089
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions spec/frozen/language/private_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,20 @@
end

it "changes visibility of previously called method" do
f = Private::F.new
klass = Private::F
f = klass.new
f.foo
module Private
class F
private :foo
end
end
klass.class_eval { private :foo }
lambda { f.foo }.should raise_error(NoMethodError)
end

it "changes visiblity of previously called methods with same send/call site" do
g = Private::G.new
klass = Private::G
g = klass.new
lambda {
2.times do
g.foo
module Private
class G
private :foo
end
end
klass.class_eval { private :foo }
end
}.should raise_error(NoMethodError)
end
Expand Down

0 comments on commit a745089

Please sign in to comment.