Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

root/trunk/activesupport/lib/active_support/json/encoders/regexp.rb

Revision 7736, 73 bytes (checked in by bitsweat, 1 year ago)

Hash#to_json takes :only or :except options to specific or omit certain hash keys. Enumerable#to_json passes through its options to each element. Closes #9751.

Line 
1 class Regexp
2   def to_json(options = nil) #:nodoc:
3     inspect
4   end
5 end
Note: See TracBrowser for help on using the browser.