case 0.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/case.rb +10 -0
  3. metadata +2 -2
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rake/rdoctask'
4
4
  require 'rake/gempackagetask'
5
5
  require 'rake/clean'
6
6
 
7
- GEM_VERSION = "0.2"
7
+ GEM_VERSION = "0.2.1"
8
8
 
9
9
  Rake::RDocTask.new do |task|
10
10
  task.rdoc_files.add [ 'lib/**/*.rb' ]
@@ -35,6 +35,16 @@ class Any
35
35
  end
36
36
  end
37
37
 
38
+ if defined ::Tuple
39
+ class Tuple < ::Tuple
40
+ def ===(other)
41
+ return false unless ::Tuple === other and size == other.size
42
+ to_a.zip(other) { |a, b| return false unless a === b }
43
+ true
44
+ end
45
+ end
46
+ end
47
+
38
48
  class Array < ::Array
39
49
  def ===(other)
40
50
  return false unless ::Array === other and size == other.size
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: case
5
5
  version: !ruby/object:Gem::Version
6
- version: "0.2"
7
- date: 2008-01-16 00:00:00 -05:00
6
+ version: 0.2.1
7
+ date: 2008-01-17 00:00:00 -05:00
8
8
  summary: Pattern matching for Ruby
9
9
  require_paths:
10
10
  - lib