Skip to content

Instantly share code, notes, and snippets.

@revans
Created December 7, 2012 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save revans/4237622 to your computer and use it in GitHub Desktop.
Save revans/4237622 to your computer and use it in GitHub Desktop.
jbuilder issue #72
# ran with ruby 1.9.3-p372
require 'jbuilder'
require 'json'
json = Jbuilder.new
json.barf '1/10'.to_r
sample = json.target! # kaboom
puts sample # => {"barf":"1/10"}
read_json = JSON.parse(sample)
puts read_json # => {"barf"=>"1/10"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment