summaryrefslogtreecommitdiff
path: root/spec/ruby/core/basicobject
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/basicobject')
-rw-r--r--spec/ruby/core/basicobject/instance_eval_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/core/basicobject/instance_eval_spec.rb b/spec/ruby/core/basicobject/instance_eval_spec.rb
index f8d9d75059..475910e56e 100644
--- a/spec/ruby/core/basicobject/instance_eval_spec.rb
+++ b/spec/ruby/core/basicobject/instance_eval_spec.rb
@@ -284,7 +284,7 @@ describe "BasicObject#instance_eval" do
def source_code.to_str() :symbol end
a = BasicObject.new
- -> { a.instance_eval(source_code) }.should raise_error(TypeError, /can't convert Object to String/)
+ -> { a.instance_eval(source_code) }.should raise_consistent_error(TypeError, /can't convert Object into String/)
end
it "converts filename argument with #to_str method" do
@@ -303,7 +303,7 @@ describe "BasicObject#instance_eval" do
filename = Object.new
def filename.to_str() :symbol end
- -> { Object.new.instance_eval("raise", filename) }.should raise_error(TypeError, /can't convert Object to String/)
+ -> { Object.new.instance_eval("raise", filename) }.should raise_consistent_error(TypeError, /can't convert Object into String/)
end
it "converts lineno argument with #to_int method" do
@@ -322,6 +322,6 @@ describe "BasicObject#instance_eval" do
lineno = Object.new
def lineno.to_int() :symbol end
- -> { Object.new.instance_eval("raise", "file.rb", lineno) }.should raise_error(TypeError, /can't convert Object to Integer/)
+ -> { Object.new.instance_eval("raise", "file.rb", lineno) }.should raise_consistent_error(TypeError, /can't convert Object into Integer/)
end
end