diff --git a/test/db/postgresql/jsonb_test.rb b/test/db/postgresql/jsonb_test.rb
index <HASH>..<HASH> 100644
--- a/test/db/postgresql/jsonb_test.rb
+++ b/test/db/postgresql/jsonb_test.rb
@@ -49,14 +49,14 @@ class PostgreSQLJSONBTest < Test::Unit::TestCase
     assert @column = JsonbDataType.columns.find { |c| c.name == 'payload' }
 
     data = "{\"a_key\":\"a_value\"}"
-    hash = @column.class.string_to_json data
+    hash = @column.class.string_to_json(data)
     assert_equal({'a_key' => 'a_value'}, hash)
     assert_equal({'a_key' => 'a_value'}, @column.type_cast(data))
 
     assert_equal({}, @column.type_cast("{}"))
     assert_equal({'key'=>nil}, @column.type_cast('{"key": null}'))
     assert_equal({'c'=>'}','"a"'=>'b "a b'}, @column.type_cast(%q({"c":"}", "\"a\"":"b \"a b"})))
-  end
+  end unless ar_version('4.2')
 
   def test_rewrite
     @connection.execute "insert into jsonb_data_type (payload) VALUES ('{\"k\":\"v\"}')"
jsonb (type-cast) test makes no longer sense on AR <I>