Skip to content

Commit 6ea2ad6

Browse files
committed
[test] keep the rake_test MRI runnable (fix old Ruby compatibility)
1 parent 5484671 commit 6ea2ad6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/db/postgresql/rake_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def psql(args)
140140
`#{PSQL_EXE} #{args}`
141141
end
142142

143-
if ActiveRecord::VERSION::STRING.start_with?('4.2') && JRUBY_VERSION.start_with?('1.7') rescue nil
143+
if ActiveRecord::VERSION::STRING.start_with?('4.2') && defined?(JRUBY_VERSION) && JRUBY_VERSION.start_with?('1.7')
144144
warn "NOTE: patching structure_dump due on JRuby #{JRUBY_VERSION}"
145145
# NOTE: a hack around structure_dump failing due system(cmd, *args) on 1.7 (not going to get fixed)
146146
# RuntimeError: failed to execute:

0 commit comments

Comments
 (0)