Sha256: 48428e12f4a1ee30cbcfeea99da542f65488354f6a824aa10900f70148563657
Contents?: true
Size: 376 Bytes
Versions: 3
Compression:
Stored size: 376 Bytes
Contents
require "mpatch" x = {} (1..10000).each do |i| x["key#{i}"] = i end t=Time.now x.map_hash{ |k,v| { k.to_sym => v.to_s } } puts Time.now - t var= {hello: "world",no: "yes"} puts var var= [[:hello, "world"],[:no, "yes"]].map_hash{|k,v| {k => v} } puts var.inspect # require 'debugger' # debugger var = { hello: "world",no: 'yes' }.include_hash?( no: 'yes' ) puts var
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mpatch-2.12.2 | examples/hash.rb |
mpatch-2.12.1 | examples/hash.rb |
mpatch-2.12.0 | examples/hash.rb |