mirror of
https://github.com/ruby/ruby.git
synced 2025-09-23 20:44:00 +02:00
Fix rdoc of OpenStruct.json_create [ci skip]
* ext/json/lib/json/add/ostruct.rb (OpenStruct.json_create): Correct documentation, fix the name of values. [Fix GH-1421] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4b298ad77a
commit
c2d77880c0
2 changed files with 6 additions and 1 deletions
|
@ -7,7 +7,7 @@ require 'ostruct'
|
|||
class OpenStruct
|
||||
|
||||
# Deserializes JSON string by constructing new Struct object with values
|
||||
# <tt>v</tt> serialized by <tt>to_json</tt>.
|
||||
# <tt>t</tt> serialized by <tt>to_json</tt>.
|
||||
def self.json_create(object)
|
||||
new(object['t'] || object[:t])
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue