From fcbf63e62c627deae76c1b8cb8c0876c536ed811 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Mon, 16 Mar 2020 18:49:26 +0900 Subject: Fresh start --- jni/ruby/lib/rake/ruby182_test_unit_fix.rb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 jni/ruby/lib/rake/ruby182_test_unit_fix.rb (limited to 'jni/ruby/lib/rake/ruby182_test_unit_fix.rb') diff --git a/jni/ruby/lib/rake/ruby182_test_unit_fix.rb b/jni/ruby/lib/rake/ruby182_test_unit_fix.rb new file mode 100644 index 0000000..40b30a6 --- /dev/null +++ b/jni/ruby/lib/rake/ruby182_test_unit_fix.rb @@ -0,0 +1,29 @@ +# TODO: Remove in rake 11 + +# Local Rake override to fix bug in Ruby 0.8.2 +module Test # :nodoc: + # Local Rake override to fix bug in Ruby 0.8.2 + module Unit # :nodoc: + # Local Rake override to fix bug in Ruby 0.8.2 + module Collector # :nodoc: + # Local Rake override to fix bug in Ruby 0.8.2 + class Dir # :nodoc: + undef collect_file + def collect_file(name, suites, already_gathered) # :nodoc: + dir = File.dirname(File.expand_path(name)) + $:.unshift(dir) unless $:.first == dir + if @req + @req.require(name) + else + require(name) + end + find_test_cases(already_gathered).each do |t| + add_suite(suites, t.suite) + end + ensure + $:.delete_at $:.rindex(dir) + end + end + end + end +end -- cgit v1.2.3