@@ -53,22 +53,30 @@ def run_ruby_with_current_load_path(ruby_command, *flags)
53
53
end
54
54
end
55
55
56
- def strip_known_warnings ( input )
57
- input . split ( " \n " ) . reject do | l |
56
+ LINES_TO_IGNORE =
57
+ [
58
58
# Ignore bundler warning.
59
- l =~ %r{bundler/source/rubygems} ||
59
+ %r{bundler/source/rubygems} ,
60
60
# Ignore bundler + rubygems warning.
61
- l =~ %r{site_ruby/\d \. \d \. \d /rubygems} ||
62
- l =~ %r{jruby-\d \. \d \. \d \. \d /lib/ruby/stdlib/rubygems} ||
61
+ %r{site_ruby/\d \. \d \. \d /rubygems} ,
62
+ %r{jruby-\d \. \d \. \d \. \d /lib/ruby/stdlib/rubygems} ,
63
63
# This is required for windows for some reason
64
- l =~ %r{lib/bundler/rubygems} ||
64
+ %r{lib/bundler/rubygems} ,
65
65
# This is a JRuby file that generates warnings on 9.0.3.0
66
- l =~ %r{lib/ruby/stdlib/jar} ||
66
+ %r{lib/ruby/stdlib/jar} ,
67
67
# This is a JRuby file that generates warnings on 9.1.7.0
68
- l =~ %r{org/jruby/RubyKernel\. java} ||
68
+ %r{org/jruby/RubyKernel\. java} ,
69
69
# This is a JRuby gem that generates warnings on 9.1.7.0
70
- l =~ %r{uninitialized constant FFI} ||
71
- l =~ %r{io/console on JRuby shells out to stty for most operations} ||
70
+ %r{ffi-1\. 13\. \d +-java} ,
71
+ %r{uninitialized constant FFI} ,
72
+ # These are related to the above, there is a warning about io from FFI
73
+ %r{jruby-\d \. \d \. \d \. \d /lib/ruby/stdlib/io} ,
74
+ %r{io/console on JRuby shells out to stty for most operations} ,
75
+ ]
76
+
77
+ def strip_known_warnings ( input )
78
+ input . split ( "\n " ) . reject do |l |
79
+ LINES_TO_IGNORE . any? { |to_ignore | l =~ to_ignore } ||
72
80
# Remove blank lines
73
81
l == "" || l . nil?
74
82
end . join ( "\n " )
0 commit comments