Skip to content

Commit

Permalink
Handle string conversion to symbol consistently
Browse files Browse the repository at this point in the history
Don't want to include the colon or we get :":sym"
  • Loading branch information
tjkirch committed Mar 13, 2011
1 parent 8a9f9c1 commit 376e8db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion events/admin.rb
Expand Up @@ -571,7 +571,7 @@ def aset(event, player, room)
when "false"
value = false
when /^:/
value = value.to_sym
value = value[1..-1].to_sym
when "nil"
value = nil
when /^[0-9]+$/
Expand Down
2 changes: 1 addition & 1 deletion lib/gary.rb
Expand Up @@ -134,7 +134,7 @@ def find_all(attrib, match)
when /^\d+$/
match = match.to_i
when /^:/
match = match.to_sym
match = match[1..-1].to_sym
end
if attrib == "class" and (match.is_a? Class or match.is_a? Module)
@ghash.dup.each do |goid, obj|
Expand Down

0 comments on commit 376e8db

Please sign in to comment.