Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Implement 1.9 features Symbol#length and Symbol#size.

  • Loading branch information...
commit 652fd0e89296beb052e340b998011985d65a6e13 1 parent ecf8e5f
@r-stu31 r-stu31 authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 kernel/common/symbol19.rb
View
6 kernel/common/symbol19.rb
@@ -45,6 +45,12 @@ def empty?
alias_method :intern, :to_sym
alias_method :id2name, :to_s
+ def length
+ to_s.length
+ end
+
+ alias_method :size, :length
+
def match(pattern)
str = to_s
Please sign in to comment.
Something went wrong with that request. Please try again.