rubinius/rubinius — pull request #1811 by inukshuk (2012-07-13 17:20:07+00:00)
Title: Support Struct attribute names with a hyphen

The Struct._specialize method (called when creating new
structs) generates code containing the attribute names.
If a name contains a hyphen this previously led to invalid
code (raising a runtime error because the hyphen was
interpreted as a minus). For example, the following Struct
creation:

klass = Struct.new(:'foo-bar')

Led to the following code:

def initialize(a0 = nil)
@foo-bar = a0
self
end

This commit changes all access to the instance variables
to use instance_variable_get and set respectively.