summaryrefslogtreecommitdiff
path: root/spec/ruby/language
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/language')
-rw-r--r--spec/ruby/language/fixtures/send.rb3
-rw-r--r--spec/ruby/language/send_spec.rb1
2 files changed, 3 insertions, 1 deletions
diff --git a/spec/ruby/language/fixtures/send.rb b/spec/ruby/language/fixtures/send.rb
index c3013616b2..918241e171 100644
--- a/spec/ruby/language/fixtures/send.rb
+++ b/spec/ruby/language/fixtures/send.rb
@@ -53,8 +53,9 @@ module LangSendSpecs
end
class PrivateGetter
- attr_reader :foo
+ attr_accessor :foo
private :foo
+ private :foo=
def call_self_foo
self.foo
diff --git a/spec/ruby/language/send_spec.rb b/spec/ruby/language/send_spec.rb
index 290b8662db..5e6571893c 100644
--- a/spec/ruby/language/send_spec.rb
+++ b/spec/ruby/language/send_spec.rb
@@ -269,6 +269,7 @@ describe "Invoking a private getter method" do
it "permits self as a receiver" do
receiver = LangSendSpecs::PrivateGetter.new
-> { receiver.call_self_foo }.should_not raise_error(NoMethodError)
+ -> { receiver.call_self_foo_or_equals(6) }.should_not raise_error(NoMethodError)
end
end
end