code-ruby 0.15.11 → 0.15.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/code +4 -1
- data/lib/code/object/parameter.rb +1 -1
- data/lib/code/version.rb +1 -1
- data/spec/code_spec.rb +15 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d25709cc45c81b913c88e19a5c3981db53a787211b18ed5e0ae9ca562450e98b
|
4
|
+
data.tar.gz: 5dda0a4c74c867ab304454519ea27242db1f8b4dbbc9ee48d7bffed8fb1ffba9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 605e509a867be495750727afd3059ab4e93f3dd5123c1b0716f3008b77ab8a07dbb29f26e6785b1bbb5f408859f89edaa8efd7d5c65fe893237a591ade7e859d
|
7
|
+
data.tar.gz: 04b087fea330fb2e729952d116e8304673ae82696e7fdaeef3e7480dc779cf9b602ad5930c7578b80dfeed4750437d9920d5f49643fb0c987094d30145526ecf
|
data/Gemfile.lock
CHANGED
data/bin/code
CHANGED
@@ -64,7 +64,10 @@ argv =
|
|
64
64
|
end
|
65
65
|
.parse!
|
66
66
|
|
67
|
-
|
67
|
+
if options[:input].empty?
|
68
|
+
options[:input] = argv.join(" ")
|
69
|
+
options[:input] = File.read(options[:input]) if File.exist?(options[:input])
|
70
|
+
end
|
68
71
|
|
69
72
|
abort <<~HELP if options[:input].empty?
|
70
73
|
Usage: code INPUT
|
data/lib/code/version.rb
CHANGED
data/spec/code_spec.rb
CHANGED
@@ -323,4 +323,19 @@ RSpec.describe Code do
|
|
323
323
|
expect(output.string).to eq(expected)
|
324
324
|
end
|
325
325
|
end
|
326
|
+
|
327
|
+
it "doesn't crash with dictionnary as parameter" do
|
328
|
+
Code.evaluate(<<~INPUT)
|
329
|
+
[
|
330
|
+
{
|
331
|
+
videos: [{}]
|
332
|
+
},
|
333
|
+
{
|
334
|
+
videos: [{}]
|
335
|
+
}
|
336
|
+
].map do |post|
|
337
|
+
post.videos.map { |video| }
|
338
|
+
end
|
339
|
+
INPUT
|
340
|
+
end
|
326
341
|
end
|