diff options
-rw-r--r-- | Gemfile | 6 | ||||
-rw-r--r-- | activerecord/test/cases/query_cache_test.rb | 3 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/output_safety.rb | 2 |
3 files changed, 6 insertions, 5 deletions
@@ -75,7 +75,7 @@ end platforms :jruby do gem "ruby-debug", ">= 0.10.3" gem "json" - gem "activerecord-jdbcsqlite3-adapter" + gem "activerecord-jdbcsqlite3-adapter", ">= 1.2.0" # This is needed by now to let tests work on JRuby # TODO: When the JRuby guys merge jruby-openssl in @@ -83,8 +83,8 @@ platforms :jruby do gem "jruby-openssl" group :db do - gem "activerecord-jdbcmysql-adapter" - gem "activerecord-jdbcpostgresql-adapter" + gem "activerecord-jdbcmysql-adapter", ">= 1.2.0" + gem "activerecord-jdbcpostgresql-adapter", ">= 1.2.0" end end diff --git a/activerecord/test/cases/query_cache_test.rb b/activerecord/test/cases/query_cache_test.rb index e3ad0cad90..cda30a773e 100644 --- a/activerecord/test/cases/query_cache_test.rb +++ b/activerecord/test/cases/query_cache_test.rb @@ -148,12 +148,13 @@ class QueryCacheTest < ActiveRecord::TestCase def test_cache_does_not_wrap_string_results_in_arrays require 'sqlite3/version' if current_adapter?(:SQLite3Adapter) + sqlite3_version = RUBY_PLATFORM =~ /java/ ? Jdbc::SQLite3::VERSION : SQLite3::VERSION Task.cache do # Oracle adapter returns count() as Fixnum or Float if current_adapter?(:OracleAdapter) assert_kind_of Numeric, Task.connection.select_value("SELECT count(*) AS count_all FROM tasks") - elsif current_adapter?(:SQLite3Adapter) && SQLite3::VERSION > '1.2.5' || current_adapter?(:Mysql2Adapter) || current_adapter?(:MysqlAdapter) + elsif current_adapter?(:SQLite3Adapter) && sqlite3_version > '1.2.5' || current_adapter?(:Mysql2Adapter) || current_adapter?(:MysqlAdapter) # Future versions of the sqlite3 adapter will return numeric assert_instance_of Fixnum, Task.connection.select_value("SELECT count(*) AS count_all FROM tasks") diff --git a/activesupport/lib/active_support/core_ext/string/output_safety.rb b/activesupport/lib/active_support/core_ext/string/output_safety.rb index 05b39b89bf..3ae3d64fa4 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -142,7 +142,7 @@ module ActiveSupport #:nodoc: end UNSAFE_STRING_METHODS.each do |unsafe_method| - class_eval <<-EOT, __FILE__, __LINE__ + class_eval <<-EOT, __FILE__, __LINE__ + 1 def #{unsafe_method}(*args, &block) # def capitalize(*args, &block) to_str.#{unsafe_method}(*args, &block) # to_str.gsub(*args, &block) end # end |