vidibus-core_extensions 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
@@ -37,7 +37,9 @@ module Vidibus
37
37
  #
38
38
  def only(*keys)
39
39
  keys.flatten!
40
- self.class[*self.select { |k,v| keys.include?(k) }.flatten_once]
40
+ args = self.select { |k,v| keys.include?(k) }
41
+ args = args.flatten_once if args.is_a?(Array) # prior to ruby 1.9.1, Hash#select returns an array
42
+ self.class[*args]
41
43
  end
42
44
 
43
45
  # Returns a copy of self including all but the given keys.
@@ -51,7 +53,9 @@ module Vidibus
51
53
  #
52
54
  def except(*keys)
53
55
  keys.flatten!
54
- self.class[*self.select { |k,v| !keys.include?(k) }.flatten_once]
56
+ args = self.select { |k,v| !keys.include?(k) }
57
+ args = args.flatten_once if args.is_a?(Array) # prior to ruby 1.9.1, Hash#select returns an array
58
+ self.class[*args]
55
59
  end
56
60
  end
57
61
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{vidibus-core_extensions}
8
- s.version = "0.3.2"
8
+ s.version = "0.3.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andre Pankratz"]
12
- s.date = %q{2010-08-12}
12
+ s.date = %q{2010-08-17}
13
13
  s.description = %q{Provides some extensions to the ruby core.}
14
14
  s.email = %q{andre@vidibus.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vidibus-core_extensions
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 2
10
- version: 0.3.2
9
+ - 3
10
+ version: 0.3.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andre Pankratz
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-12 00:00:00 +02:00
18
+ date: 2010-08-17 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency