; ruby.rb: Fix pattern matching syntax and extend the example

This commit is contained in:
Dmitry Gutov 2023-01-09 00:57:36 +02:00
parent d46f7f4edc
commit 20f36c8f6f

View file

@ -513,7 +513,7 @@ def qux
case translation
in ['th', orig_text, 'en', trans_text]
puts "English translation: #{orig_text} => #{trans_text}"
in {'th' => orig_text, 'ja' => trans_text}
in {th: orig_text, ja: trans_text} => whole
puts "Japanese translation: #{orig_text} => #{trans_text}"
end