Skip to content

Instantly share code, notes, and snippets.

@sparr
Created July 26, 2018 01:14
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 sparr/65452bafac7303cf3b3bab509b58d64c to your computer and use it in GitHub Desktop.
Save sparr/65452bafac7303cf3b3bab509b58d64c to your computer and use it in GitHub Desktop.
"interning empty string" when an empty string should have been caught
def convert(value)
case value
when Symbol, '' # can't intern an empty string
value
when String
value.intern
when true
:true
when false
:false
else
value.to_s.intern # <-- how can this be throwing "interning empty string"??
end
end
@sparr
Copy link
Author

sparr commented Jul 26, 2018

Problem solved. nil is the value in question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment