[前][次][番号順一覧][スレッド一覧]

ruby-changes:58314

From: Nobuyoshi <ko1@a...>
Date: Fri, 18 Oct 2019 22:19:27 +0900 (JST)
Subject: [ruby-changes:58314] 9cb809cfef (master): Verbatim texts need more indent [ci skip]

https://git.ruby-lang.org/ruby.git/commit/?id=9cb809cfef

From 9cb809cfefafc58cc0bf56184ecc94aec3c41c1d Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 18 Oct 2019 22:17:06 +0900
Subject: Verbatim texts need more indent [ci skip]

And separate ruby script and executed example.

diff --git a/NEWS b/NEWS
index 5d10fec..b72ab73 100644
--- a/NEWS
+++ b/NEWS
@@ -405,18 +405,22 @@ OptionParser:: https://github.com/ruby/ruby/blob/trunk/NEWS#L405
 
   * Now show "Did you mean?" for unknown option.  [Feature #16256]
 
-    require 'optparse'
-    OptionParser.new do |opts|
-      opts.on("-f", "--foo", "foo") {|v| }
-      opts.on("-b", "--bar", "bar") {|v| }
-      opts.on("-c", "--baz", "baz") {|v| }
-    end.parse!
-
-    $ ruby test.rb --baa
-    Traceback (most recent call last):
-    test.rb:7:in `<main>': invalid option: --baa (OptionParser::InvalidOption)
-    Did you mean?  baz
-                   bar
+    test.rb:
+
+      require 'optparse'
+      OptionParser.new do |opts|
+        opts.on("-f", "--foo", "foo") {|v| }
+        opts.on("-b", "--bar", "bar") {|v| }
+        opts.on("-c", "--baz", "baz") {|v| }
+      end.parse!
+
+    example:
+
+      $ ruby test.rb --baa
+      Traceback (most recent call last):
+      test.rb:7:in `<main>': invalid option: --baa (OptionParser::InvalidOption)
+      Did you mean?  baz
+                     bar
 
 Pathname::
 
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]