{"push_id":2929915905,"size":2,"distinct_size":2,"ref":"refs/heads/schneems/keymaster","head":"c8cd627982347ba7efb0294bfa86d91bad1b056a","before":"6f1f8eb2cd0a20bbd8fa4a5b64bf8386041a3aba","commits":[{"sha":"4aaf85f0498809b551855da13bef55cf0eb66eb9","author":{"name":"schneems","email":"a7a532ca64eb4cf510aab174cdabcc084c29a395@gmail.com"},"message":"Fast check if is a key master or make a new one\n\nIt is faster to check if an element is a class then to check if it responds to a given method. \n\n\n```\nrequire 'benchmark/ips'\n\nFoo = Class.new do\n  def foo\n  end\nend\n\nfoo = Foo.new\n\nBenchmark.ips do |x|\n  x.report(\"respond_to\") { foo.respond_to?(:foo) }\n  x.report(\"is_a      \") { foo.is_a?(Foo) }\n  x.compare!\nend\n# Warming up --------------------------------------\n#           respond_to   280.781k i/100ms\n#           is_a         302.939k i/100ms\n# Calculating -------------------------------------\n#           respond_to      8.731M (± 3.6%) i/s -     43.802M in   5.024045s\n#           is_a            9.871M (± 2.4%) i/s -     49.379M in   5.005359s\n\n# Comparison:\n#           is_a      :  9870889.9 i/s\n#           respond_to:  8731090.4 i/s - 1.13x  slower\n```","distinct":true,"url":"https://api.github.com/repos/schneems/rails/commits/4aaf85f0498809b551855da13bef55cf0eb66eb9"},{"sha":"c8cd627982347ba7efb0294bfa86d91bad1b056a","author":{"name":"schneems","email":"a7a532ca64eb4cf510aab174cdabcc084c29a395@gmail.com"},"message":"Code climate","distinct":true,"url":"https://api.github.com/repos/schneems/rails/commits/c8cd627982347ba7efb0294bfa86d91bad1b056a"}]}
{"actor":{"display_login":"schneems"}}