Skip to content

Instantly share code, notes, and snippets.

@krainboltgreene
Created August 25, 2012 04:46
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 krainboltgreene/3460906 to your computer and use it in GitHub Desktop.
Save krainboltgreene/3460906 to your computer and use it in GitHub Desktop.
example = OpenStruct.new
example.marshal_load = "example;example;example" # => "example;example;example"
example.table # => nil
example # => #<OpenStruct marshal_load="example;example;example">
example.marshal_load # => ArgumentError: wrong number of arguments (0 for 1)
example.marshal_load "red" # => NoMethodError: undefined method `each_key' for "red":String
example # => #<OpenStruct:0x3fd970c44120>
example.table # => TypeError: can't convert Symbol into Integer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment