Skip to content

Instantly share code, notes, and snippets.

@Serabe
Created March 15, 2009 18:44
Show Gist options
  • Save Serabe/79503 to your computer and use it in GitHub Desktop.
Save Serabe/79503 to your computer and use it in GitHub Desktop.
class Module
def optional
[self,:optional]
end
end
a = [Range, Fixnum.optional, String.optional] #=> [Range, [Fixnum, :optional], [String, :optional]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment