Permalink
Browse files

Alias inspect to to_s for nil, true & false.

  • Loading branch information...
1 parent 67cae77 commit 65fcf83d0102a1ca17a87b48bd5e2f7d19f16240 @bakkdoor committed Jun 16, 2011
Showing with 6 additions and 0 deletions.
  1. +2 −0 lib/false_class.fy
  2. +2 −0 lib/nil_class.fy
  3. +2 −0 lib/true_class.fy
View
@@ -37,6 +37,8 @@ class FalseClass {
"false"
}
+ alias_method: 'inspect for: 'to_s
+
def to_a {
"Returns an empty @Array@."
[]
View
@@ -69,6 +69,8 @@ class NilClass {
""
}
+ alias_method: 'inspect for: 'to_s
+
def to_a {
"""
@return An empty @Array@.
View
@@ -52,6 +52,8 @@ class TrueClass {
"true"
}
+ alias_method: 'inspect for: 'to_s
+
def to_a {
"""
@return An empty @Array@.

0 comments on commit 65fcf83

Please sign in to comment.