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

ruby-changes:69963

From: Nobuyoshi <ko1@a...>
Date: Sun, 28 Nov 2021 17:14:58 +0900 (JST)
Subject: [ruby-changes:69963] ca7de49aa5 (master): [ruby/ostruct] [DOC] Fix code markups [ci skip]

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

From ca7de49aa50fee34628e5e239f04ec76ec85f1f4 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sun, 28 Nov 2021 15:16:53 +0900
Subject: [ruby/ostruct] [DOC] Fix code markups [ci skip]

Backquotes are not special characters in RDoc.

https://github.com/ruby/ostruct/commit/a901df26b9
---
 lib/ostruct.rb | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/ostruct.rb b/lib/ostruct.rb
index a40729bb5d4..c2de7a493d8 100644
--- a/lib/ostruct.rb
+++ b/lib/ostruct.rb
@@ -93,16 +93,16 @@ https://github.com/ruby/ruby/blob/trunk/lib/ostruct.rb#L93
 #   o.methods = [:foo, :bar]
 #   o.methods # => [:foo, :bar]
 #
-# To help remedy clashes, OpenStruct uses only protected/private methods ending with `!`
-# and defines aliases for builtin public methods by adding a `!`:
+# To help remedy clashes, OpenStruct uses only protected/private methods ending with <code>!</code>
+# and defines aliases for builtin public methods by adding a <code>!</code>:
 #
 #   o = OpenStruct.new(make: 'Bentley', class: :luxury)
 #   o.class # => :luxury
 #   o.class! # => OpenStruct
 #
-# It is recommended (but not enforced) to not use fields ending in `!`;
+# It is recommended (but not enforced) to not use fields ending in <code>!</code>;
 # Note that a subclass' methods may not be overwritten, nor can OpenStruct's own methods
-# ending with `!`.
+# ending with <code>!</code>.
 #
 # For all these reasons, consider not using OpenStruct at all.
 #
@@ -279,7 +279,7 @@ class OpenStruct https://github.com/ruby/ruby/blob/trunk/lib/ostruct.rb#L279
   # :call-seq:
   #   ostruct[name]  -> object
   #
-  # Returns the value of an attribute, or `nil` if there is no such attribute.
+  # Returns the value of an attribute, or +nil+ if there is no such attribute.
   #
   #   require "ostruct"
   #   person = OpenStruct.new("name" => "John Smith", "age" => 70)
@@ -452,7 +452,7 @@ class OpenStruct https://github.com/ruby/ruby/blob/trunk/lib/ostruct.rb#L452
     update_to_values!(h)
   end
 
-  # Make all public methods (builtin or our own) accessible with `!`:
+  # Make all public methods (builtin or our own) accessible with <code>!</code>:
   instance_methods.each do |method|
     new_name = "#{method}!"
     alias_method new_name, method
-- 
cgit v1.2.1


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

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