Skip to content

Commit f3fb8a2

Browse files
authored
Merge pull request #740 from Edouard-chin/ec-minor-fixed
Few doc tweaks:
2 parents 01f0bc9 + b2b106e commit f3fb8a2

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ To combine JSON fragments into a bigger JSON document, you can use `JSON::Fragme
121121
posts_json = cache.fetch_multi(post_ids) do |post_id|
122122
JSON.generate(Post.find(post_id))
123123
end
124-
posts_json.map { |post_json| JSON::Fragment.new(post_json) }
124+
posts_json.map! { |post_json| JSON::Fragment.new(post_json) }
125125
JSON.generate({ posts: posts_json, count: posts_json.count })
126126
```
127127

json.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ spec = Gem::Specification.new do |s|
5252
s.files += Dir["lib/json/ext/**/*.jar"]
5353
else
5454
s.extensions = Dir["ext/json/**/extconf.rb"]
55-
s.files += Dir["ext/json/**/*.{c,h,rl}"]
55+
s.files += Dir["ext/json/**/*.{c,h}"]
5656
end
5757
end
5858

lib/json/common.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,10 @@ class MissingUnicodeSupport < JSONError; end
172172
# JSON.generate({ count: 3, items: fragments })
173173
#
174174
# This allows to easily assemble multiple JSON fragments that have
175-
# been peristed somewhere without having to parse them nor resorting
175+
# been persisted somewhere without having to parse them nor resorting
176176
# to string interpolation.
177177
#
178-
# Note: no validation is performed on the provided string. it is the
178+
# Note: no validation is performed on the provided string. It is the
179179
# responsability of the caller to ensure the string contains valid JSON.
180180
Fragment = Struct.new(:json) do
181181
def initialize(json)

0 commit comments

Comments
 (0)