diff options
Diffstat (limited to 'spec/ruby/core/basicobject/instance_eval_spec.rb')
| -rw-r--r-- | spec/ruby/core/basicobject/instance_eval_spec.rb | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/spec/ruby/core/basicobject/instance_eval_spec.rb b/spec/ruby/core/basicobject/instance_eval_spec.rb index 1f3a43f341..633b5c2cb1 100644 --- a/spec/ruby/core/basicobject/instance_eval_spec.rb +++ b/spec/ruby/core/basicobject/instance_eval_spec.rb @@ -141,22 +141,11 @@ describe "BasicObject#instance_eval" do caller.get_constant_with_string(receiver).should == :singleton_class end - ruby_version_is ""..."3.1" do - it "looks in the caller scope next" do - receiver = BasicObjectSpecs::InstEval::Constants::ConstantInReceiverClass::ReceiverScope::Receiver.new - caller = BasicObjectSpecs::InstEval::Constants::ConstantInReceiverClass::CallerScope::Caller.new + it "looks in the receiver class next" do + receiver = BasicObjectSpecs::InstEval::Constants::ConstantInReceiverClass::ReceiverScope::Receiver.new + caller = BasicObjectSpecs::InstEval::Constants::ConstantInReceiverClass::CallerScope::Caller.new - caller.get_constant_with_string(receiver).should == :Caller - end - end - - ruby_version_is "3.1" do - it "looks in the receiver class next" do - receiver = BasicObjectSpecs::InstEval::Constants::ConstantInReceiverClass::ReceiverScope::Receiver.new - caller = BasicObjectSpecs::InstEval::Constants::ConstantInReceiverClass::CallerScope::Caller.new - - caller.get_constant_with_string(receiver).should == :Receiver - end + caller.get_constant_with_string(receiver).should == :Receiver end it "looks in the caller class next" do |
