utilities 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/utilities.rb +7 -0
  2. data/lib/version.rb +1 -1
  3. metadata +5 -8
data/lib/utilities.rb CHANGED
@@ -279,6 +279,13 @@ module Utilities
279
279
  end
280
280
  end
281
281
 
282
+ class Hash
283
+ # Returns a new hash where {"a"=>1} becomes {:a=>1}
284
+ def symbolize_keys
285
+ each_with_object({}){ |(k,v),h| h[k.to_sym] = v }
286
+ end
287
+ end
288
+
282
289
  class Array
283
290
  # Returns true if the array contains only numerical values
284
291
  def numerics?( allow_nil = false )
data/lib/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  class Utilities
2
2
  MAJOR = 0
3
3
  MINOR = 0
4
- BUILD = 10
4
+ BUILD = 11
5
5
 
6
6
  VERSION = "#{MAJOR}.#{MINOR}.#{BUILD}"
7
7
  end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utilities
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
5
- prerelease:
4
+ prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 0
9
- - 10
10
- version: 0.0.10
8
+ - 11
9
+ version: 0.0.11
11
10
  platform: ruby
12
11
  authors:
13
12
  - Christian Blais
@@ -17,7 +16,7 @@ autorequire:
17
16
  bindir: bin
18
17
  cert_chain: []
19
18
 
20
- date: 2011-07-13 00:00:00 -04:00
19
+ date: 2011-08-21 00:00:00 -04:00
21
20
  default_executable:
22
21
  dependencies: []
23
22
 
@@ -53,7 +52,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
52
  requirements:
54
53
  - - ">="
55
54
  - !ruby/object:Gem::Version
56
- hash: 3
57
55
  segments:
58
56
  - 0
59
57
  version: "0"
@@ -62,14 +60,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
60
  requirements:
63
61
  - - ">="
64
62
  - !ruby/object:Gem::Version
65
- hash: 3
66
63
  segments:
67
64
  - 0
68
65
  version: "0"
69
66
  requirements: []
70
67
 
71
68
  rubyforge_project:
72
- rubygems_version: 1.6.2
69
+ rubygems_version: 1.3.7
73
70
  signing_key:
74
71
  specification_version: 3
75
72
  summary: Few utilities include in all my projects