pg-hstore 1.1.7 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/pg_hstore.rb +3 -2
  2. metadata +2 -2
@@ -17,9 +17,10 @@ module PgHstore
17
17
  PAIR = /#{LITERAL}\s*=>\s*#{LITERAL}/
18
18
  NULL = /\ANULL\z/i
19
19
 
20
- # set symbolize_keys = false if you want string keys
20
+ # STRING KEYS BY DEFAULT
21
+ # set symbolize_keys = true if you want symbol keys
21
22
  # thanks to https://github.com/engageis/activerecord-postgres-hstore for regexps!
22
- def PgHstore.load(hstore, symbolize_keys = true)
23
+ def PgHstore.load(hstore, symbolize_keys = false)
23
24
  hstore.scan(PAIR).inject({}) do |memo, (k, v)|
24
25
  k = unescape unquote(k, DOUBLE_QUOTE)
25
26
  k = k.to_sym if symbolize_keys
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg-hstore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
4
+ version: 1.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-02-20 00:00:00.000000000 Z
14
+ date: 2013-07-24 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rspec