Add Symbol#intern.

This commit is contained in:
take_cheeze
2014-06-24 21:44:22 +09:00
parent 5561be961e
commit 257725cecb
2 changed files with 6 additions and 0 deletions
@@ -1,6 +1,8 @@
class Symbol
include Comparable
alias intern to_sym
def to_proc
->(obj,*args,&block) do
obj.__send__(self, *args, &block)
+4
View File
@@ -42,3 +42,7 @@ end
assert("Symbol#empty?") do
assert_true :''.empty?
end
assert('Symbol#intern') do
assert_equal :test, :test.intern
end