summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2023-01-11 11:00:58 +0100
committerJean Boussier <jean.boussier@gmail.com>2023-01-11 11:00:58 +0100
commit38871ad4e5e3b367256ac0a950b2ed7eb0335091 (patch)
tree47043061be46b3466372c51ad139fadd141a2cf6 /test
parent4db734783f7502a0b375d446409261a242dfb457 (diff)
downloadpsych-38871ad4e5e3b367256ac0a950b2ed7eb0335091.tar.gz
Get rid of anonymous eval calls
Things declared in anonymous eval are always annoying to locate.
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_encoding.rb4
-rw-r--r--test/psych/test_parser.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/psych/test_encoding.rb b/test/psych/test_encoding.rb
index 7d33814..1867d59 100644
--- a/test/psych/test_encoding.rb
+++ b/test/psych/test_encoding.rb
@@ -13,13 +13,13 @@ module Psych
(Handler.instance_methods(true) -
Object.instance_methods).each do |m|
- class_eval %{
+ class_eval <<~RUBY, __FILE__, __LINE__ + 1
def #{m} *args
@strings += args.flatten.find_all { |a|
String === a
}
end
- }
+ RUBY
end
end
diff --git a/test/psych/test_parser.rb b/test/psych/test_parser.rb
index e087e31..3b67a8e 100644
--- a/test/psych/test_parser.rb
+++ b/test/psych/test_parser.rb
@@ -16,13 +16,13 @@ module Psych
(Handler.instance_methods(true) -
Object.instance_methods).each do |m|
- class_eval %{
+ class_eval <<~RUBY, __FILE__, __LINE__ + 1
def #{m} *args
super
@marks << @parser.mark if @parser
@calls << [:#{m}, args]
end
- }
+ RUBY
end
end