Skip to content

Instantly share code, notes, and snippets.

@subbuss
Created October 27, 2014 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save subbuss/410389b8a4b4be1dce1d to your computer and use it in GitHub Desktop.
Save subbuss/410389b8a4b4be1dce1d to your computer and use it in GitHub Desktop.
cls1 = Class.new(Hash) do
def each
super do |k, v|
yield k, v
end
end
end
o = cls1.new
o['a'] = 'b'
o.map {|k, v| [k, v] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment