Playing with pattern matching via ===master
authorMatthew King <[email protected]>
Tue, 27 Nov 2007 20:39:30 +0000 (27 14:39 -0600)
committerMatthew King <[email protected]>
Tue, 27 Nov 2007 20:39:30 +0000 (27 14:39 -0600)
lib/array_case_equality.rb
spec/spec_helper.rb

index 06f7714..3595768 100644 (file)
@@ -1,8 +1,8 @@
 class Array
   
-  alias :case_equal? :===
+  alias_method :case_equal?, :===
   
-  def ===(other, counter = [0], my_rec = {}, his_rec = {}) # !> method redefined; discarding old eql?
+  def ===(other, counter = [0], my_rec = {}, his_rec = {}) # !> method redefined; discarding old ===
     return true if other.object_id == self.object_id
     return false unless other.is_a? Array
     return true if other == self
index 839d792..162a5ce 100644 (file)
@@ -1,5 +1,6 @@
 require File.dirname(__FILE__) + '/../../../../spec/spec_helper'
 
+
 plugin_spec_dir = File.dirname(__FILE__)
 # ActiveRecord::Base.logger = Logger.new(plugin_spec_dir + "/debug.log")