Skip to content

Instantly share code, notes, and snippets.

@rajonrails
Created March 12, 2012 06:52
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 rajonrails/5a171904b3b6e002d9d6 to your computer and use it in GitHub Desktop.
Save rajonrails/5a171904b3b6e002d9d6 to your computer and use it in GitHub Desktop.
ruby-1.9.2-p290 :061 > symbols_as_strings = Symbol.all_symbols.map { |x| x }
=> [:"", :"<IFUNC>", :"<CFUNC>", :respond_to?, :"core#set_method_alias", :"core#set_variable_alias", :"core#undef_method", :"core#define_method", :"core#define_singleton_method", :"core#set_postexe",
ruby-1.9.2-p290 :062 > symbols_as_strings.include?(:asdf)
=> false
ruby-1.9.2-p290 :063 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment