jsonbuilder 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,6 +24,7 @@ module Builder
24
24
  # NOTICE: you have to call this method to use array in json
25
25
  def array_mode(&block)
26
26
  @array_mode = true
27
+ eval("#{current} = []")
27
28
  yield(self)
28
29
  @array_mode = false
29
30
  end
@@ -44,7 +45,6 @@ module Builder
44
45
 
45
46
  def <<(_target)
46
47
  if @array_mode
47
- eval("#{current} ||= []")
48
48
  eval("#{current} << _target")
49
49
  else
50
50
  eval("#{current} ||= {}")
data/lib/jsonbuilder.rb CHANGED
@@ -2,7 +2,7 @@ module JsonBuilder
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- REVISION = 2
5
+ REVISION = 3
6
6
  class << self
7
7
  def to_version
8
8
  "#{MAJOR}.#{MINOR}.#{REVISION}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonbuilder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - nov