Skip to content

Commit d4c77ab

Browse files
committed
Explicitly capture the block in Jbuilder.encode
Fixes #264
1 parent 09b36f8 commit d4c77ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/jbuilder.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ def initialize(options = {})
1818
end
1919

2020
# Yields a builder and automatically turns the result into a JSON string
21-
def self.encode(*args)
22-
new(*args, &::Proc.new).target!
21+
def self.encode(*args, &block)
22+
new(*args, &block).target!
2323
end
2424

2525
BLANK = Blank.new

0 commit comments

Comments
 (0)