Skip to content

Commit

Permalink
Remove "*" from object attribute names
Browse files Browse the repository at this point in the history
  • Loading branch information
divoxx committed Oct 5, 2009
1 parent ba2c1a8 commit 698df41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/php_serialization/unserializer.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/php_serialization/unserializer.y
Expand Up @@ -31,10 +31,10 @@ rule
result = Object.const_get(val[4]).new

val[9].each do |(attr_name, value)|
result.instance_variable_set("@#{attr_name}", value)
result.instance_variable_set("@#{attr_name.gsub(/^\*/, '')}", value)
end
else
result = Struct.new(val[4], *val[9].map { |(k,v)| k.to_sym }).new(*val[9].map { |(k,v)| v })
result = Struct.new(val[4], *val[9].map { |(k,v)| k.gsub(/^\*/, '').to_sym }).new(*val[9].map { |(k,v)| v })
end
}
;
Expand Down

0 comments on commit 698df41

Please sign in to comment.