code-ruby 5.0.3 → 5.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/code/object/global.rb +10 -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: 21c1d020597fb58110205295051761fb8803f227c4a16110525740cf68d52830
|
|
4
|
+
data.tar.gz: 7b3ee5d96b0de1c5c5c9a5f462989beef1718b41d8eeacc62082f13a8616ce9b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3b892dc02af2a3989391904ee4a05ee217164cbb2c5afcc04b0f3c59e9991d7daa9eeec44bcfcafe7ab0cf6bd904bd1b6f82fd61fbb00ab83c7adfc32b7c73c4
|
|
7
|
+
data.tar.gz: 74b89492158dbd909651f06f9a5d4b466260678651d13775f78e0598a785895454263c5e9e1dbfb4af8fb2de246af2d079e61e39c0c43e983f2e2cca127e4e26
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.0.
|
|
1
|
+
5.0.4
|
data/lib/code/object/global.rb
CHANGED
|
@@ -356,6 +356,12 @@ class Code
|
|
|
356
356
|
"writes values to output with newlines and returns nothing.",
|
|
357
357
|
examples: ["puts(:hello)", "puts(1, 2)", "puts(\"hello\")"]
|
|
358
358
|
},
|
|
359
|
+
"warn" => {
|
|
360
|
+
name: "warn",
|
|
361
|
+
description:
|
|
362
|
+
"writes values to error with newlines and returns nothing.",
|
|
363
|
+
examples: ["warn(:hello)", "warn(1, 2)", "warn(\"hello\")"]
|
|
364
|
+
},
|
|
359
365
|
"read" => {
|
|
360
366
|
name: "read",
|
|
361
367
|
description: "reads one line from input.",
|
|
@@ -652,6 +658,10 @@ class Code
|
|
|
652
658
|
sig(args) { Object.repeat }
|
|
653
659
|
output.puts(*code_arguments.raw)
|
|
654
660
|
Nothing.new
|
|
661
|
+
when "warn"
|
|
662
|
+
sig(args) { Object.repeat }
|
|
663
|
+
args.fetch(:error).puts(*code_arguments.raw)
|
|
664
|
+
Nothing.new
|
|
655
665
|
when "Number"
|
|
656
666
|
sig(args) { Object.repeat }
|
|
657
667
|
if code_arguments.any?
|