aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-001/abigail/README.md1
-rw-r--r--challenge-001/abigail/ruby/ch-1.rb12
2 files changed, 13 insertions, 0 deletions
diff --git a/challenge-001/abigail/README.md b/challenge-001/abigail/README.md
index fc72aca445..ccfa7e3869 100644
--- a/challenge-001/abigail/README.md
+++ b/challenge-001/abigail/README.md
@@ -15,6 +15,7 @@ Write a script to replace the character `e` with `E` in the string
* [Node.js](node/ch-1.js)
* [Perl](perl/ch-1.pl)
* [Python](python/ch-1.py)
+* [Ruby](ruby/ch-1.rb)
## [Challenge #2](https://perlweeklychallenge.org/blog/perl-weekly-challenge-001/#challenge-2)
diff --git a/challenge-001/abigail/ruby/ch-1.rb b/challenge-001/abigail/ruby/ch-1.rb
new file mode 100644
index 0000000000..c3491daf34
--- /dev/null
+++ b/challenge-001/abigail/ruby/ch-1.rb
@@ -0,0 +1,12 @@
+#
+# See ../README.md
+#
+
+#
+# Run as: ruby ch-1.rb < input-file
+#
+
+ARGF . each_line do |_|
+ puts _ . gsub "e", "E"
+ puts _ . count "e"
+end