1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
Description: read ruby2ruby file from tests even if the lib/ dir is missing
For autopkgtest purposes
Author: Cédric Boutillier <boutil@debian.org>
Forwarded: not-needed
Last-Update: 2018-08-01
--- a/test/test_ruby2ruby.rb
+++ b/test/test_ruby2ruby.rb
@@ -1178,7 +1178,11 @@ end
# t new 2 3
tr2r = File.read(__FILE__).lines[start + 1..__LINE__ - 2].join
-ir2r = File.read("lib/ruby2ruby.rb")
+if File.exist?("lib/ruby2ruby.rb")
+ ir2r = File.read("lib/ruby2ruby.rb")
+else
+ ir2r = File.read("/usr/lib/ruby/vendor_ruby/ruby2ruby.rb")
+end
def morph_and_eval src, from, to, processor
new_src = processor.new.process(NotRubyParser.new.process(src.sub(from, to)))
|