This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(test). | |
-compile({no_auto_import,[min/2]}). | |
-export([test/2]). | |
test(A,B) -> | |
min(A,B). | |
min(A,B) when A<B -> A; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"id":"something","type":"test","category":"test","title":"a dummy document created for a test","description":"in certain settings, ruby with yajl leaks memory constantly. In order to reproduce this error a long input file with json needs to be used. multiples of this object should be able to do the job"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!/usr/bin/env ruby | |
require "rubygems" | |
require "yajl" | |
input = ARGV.shift | |
count = 0 | |
Yajl::Parser.parse(open(input)) {|line| count += 1} | |
puts count |
NewerOlder