darkhelmet-darkext 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/darkext/array.rb CHANGED
@@ -49,4 +49,9 @@ class Array
49
49
  def randomize
50
50
  self.sort_by { rand }
51
51
  end
52
+
53
+ # Destructively randomizes
54
+ def randomize!
55
+ self.replace(self.randomize)
56
+ end
52
57
  end
@@ -1,5 +1,9 @@
1
1
  class Symbol
2
- def to_proc
3
- proc { |obj,*args| obj.send(self, *args) }
2
+ # Does exactly what the activesupport version does,
3
+ # with pretty much the same code.
4
+ unless :to_proc.respond_to?(:to_proc)
5
+ def to_proc
6
+ Proc.new { |*args| args.shift.__send__(self, *args) }
7
+ end
4
8
  end
5
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: darkhelmet-darkext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Huckstep
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
11
  - /home/helmet/.gem/gem-public_cert.pem
12
- date: 2008-11-24 00:00:00 -08:00
12
+ date: 2008-11-25 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency