diff options
Diffstat (limited to 'lib/ffi_yajl/benchmark/parse.rb')
-rw-r--r-- | lib/ffi_yajl/benchmark/parse.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/ffi_yajl/benchmark/parse.rb b/lib/ffi_yajl/benchmark/parse.rb index 02ad740..ce22147 100644 --- a/lib/ffi_yajl/benchmark/parse.rb +++ b/lib/ffi_yajl/benchmark/parse.rb @@ -34,7 +34,6 @@ rescue LoadError end class FFI_Yajl::Benchmark::Parse - def run filename = File.expand_path(File.join(File.dirname(__FILE__), "subjects", "item.json")) json = File.new(filename, 'r') @@ -65,7 +64,7 @@ class FFI_Yajl::Benchmark::Parse } } io_parser = Yajl::Parser.new - io_parser.on_parse_complete = lambda {|obj|} if times > 1 + io_parser.on_parse_complete = lambda { |obj| } if times > 1 x.report { puts "Yajl::Parser#parse (from an IO)" times.times { @@ -74,7 +73,7 @@ class FFI_Yajl::Benchmark::Parse } } string_parser = Yajl::Parser.new - string_parser.on_parse_complete = lambda {|obj|} if times > 1 + string_parser.on_parse_complete = lambda { |obj| } if times > 1 x.report { puts "Yajl::Parser#parse (from a String)" times.times { @@ -143,4 +142,3 @@ class FFI_Yajl::Benchmark::Parse end end - |