File: read_ruby2ruby.patch

package info (click to toggle)
ruby-ruby2ruby 2.4.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 196 kB
  • sloc: ruby: 1,685; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 587 bytes parent folder | download
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
@@ -865,7 +865,11 @@
 # t  new    2    3
 
 tr2r = File.read(__FILE__).split(/\n/)[start + 1..__LINE__ - 2].join("\n")
-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"