Fixes unhandled case in json builder.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4464 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -36,7 +36,7 @@ module Redmine
|
||||
if args.any?
|
||||
if args.first.is_a?(Hash)
|
||||
if @struct.last.is_a?(Array)
|
||||
@struct.last << args.first
|
||||
@struct.last << args.first unless block
|
||||
else
|
||||
@struct.last[sym] = args.first
|
||||
end
|
||||
@@ -50,7 +50,7 @@ module Redmine
|
||||
end
|
||||
|
||||
if block
|
||||
@struct << {}
|
||||
@struct << (args.first.is_a?(Hash) ? args.first : {})
|
||||
block.call(self)
|
||||
ret = @struct.pop
|
||||
if @struct.last.is_a?(Array)
|
||||
|
||||
Reference in New Issue
Block a user