Merge pull request #2418 from take-cheeze/sym_intern

Add `Symbol#intern`.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-06-24 22:41:00 +09:00
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