File: read_ruby2ruby.patch

package info (click to toggle)
ruby-ruby2ruby 2.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 224 kB
  • sloc: ruby: 2,021; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 577 bytes parent folder | download | duplicates (2)
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
@@ -1150,7 +1150,11 @@
 # 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
 
 require "ruby_parser"