lib/mysql2xxxx/writer/json.rb in mysql2xxxx-0.1.1 vs lib/mysql2xxxx/writer/json.rb in mysql2xxxx-0.2.0

- old
+ new

@@ -1,10 +1,6 @@ -%w{ - active_support/json/encoding -}.each do |active_support_3_requirement| - require active_support_3_requirement -end if ::ActiveSupport::VERSION::MAJOR == 3 +require 'json' module Mysql2xxxx class JSON < Writer def to_file(f) first = true @@ -13,10 +9,10 @@ if first first = false else f.write ',' end - f.write hsh.to_json + f.write ::JSON.generate(hsh) end f.write ']' nil end end