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

ruby-changes:69566

From: Nobuyoshi <ko1@a...>
Date: Tue, 2 Nov 2021 19:18:10 +0900 (JST)
Subject: [ruby-changes:69566] a202408180 (master): Fix typos

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

From a2024081805af4e729bea029abb7bbe7c383dce2 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Tue, 2 Nov 2021 18:29:53 +0900
Subject: Fix typos

---
 ext/coverage/coverage.c                    |  2 +-
 include/ruby/internal/encoding/string.h    |  2 +-
 include/ruby/internal/fl_type.h            |  2 +-
 include/ruby/internal/intern/gc.h          |  2 +-
 include/ruby/internal/intern/thread.h      |  4 ++--
 include/ruby/io.h                          |  6 +++---
 include/ruby/ractor.h                      |  2 +-
 misc/lldb_disasm.py                        |  4 ++--
 spec/ruby/core/complex/comparision_spec.rb | 27 ---------------------------
 spec/ruby/core/complex/comparison_spec.rb  | 27 +++++++++++++++++++++++++++
 spec/ruby/core/struct/values_at_spec.rb    |  6 +++---
 spec/ruby/shared/rational/divmod.rb        |  2 +-
 test/ruby/test_iseq.rb                     |  2 +-
 test/ruby/test_objectspace.rb              |  2 +-
 yjit_core.h                                |  2 +-
 15 files changed, 46 insertions(+), 46 deletions(-)
 delete mode 100644 spec/ruby/core/complex/comparision_spec.rb
 create mode 100644 spec/ruby/core/complex/comparison_spec.rb

diff --git a/ext/coverage/coverage.c b/ext/coverage/coverage.c
index f948f623078..3dc2490d40c 100644
--- a/ext/coverage/coverage.c
+++ b/ext/coverage/coverage.c
@@ -348,7 +348,7 @@ clear_me2counter_i(VALUE key, VALUE value, VALUE unused) https://github.com/ruby/ruby/blob/trunk/ext/coverage/coverage.c#L348
  *    Coverage.suspend  => nil
  *
  * Suspend the coverage measurement.
- * You can use Coverage.resumt to restart the measurement.
+ * You can use Coverage.resume to restart the measurement.
  */
 VALUE
 rb_coverage_suspend(VALUE klass)
diff --git a/include/ruby/internal/encoding/string.h b/include/ruby/internal/encoding/string.h
index f8ce8091996..6ed7ca1c90d 100644
--- a/include/ruby/internal/encoding/string.h
+++ b/include/ruby/internal/encoding/string.h
@@ -190,7 +190,7 @@ VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc) https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/encoding/string.h#L190
  * In  other languages,  APIs like  this  one could  be seen  as the  primitive
  * routines where encodings' "encode" feature are implemented.  However in case
  * of  Ruby this  is not  the primitive  one.  We  directly manipulate  encoded
- * strings.  Encoding conversion routines  transocde an encoded string directly
+ * strings.  Encoding conversion routines  transcode an encoded string directly
  * to another one; not via a code point array.
  */
 VALUE rb_enc_uint_chr(unsigned int code, rb_encoding *enc);
diff --git a/include/ruby/internal/fl_type.h b/include/ruby/internal/fl_type.h
index 47f054256b5..08405d6f30e 100644
--- a/include/ruby/internal/fl_type.h
+++ b/include/ruby/internal/fl_type.h
@@ -183,7 +183,7 @@ RB_GNUC_EXTENSION https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/fl_type.h#L183
  * @note  About the `FL_USER` terminology: the "user" here does not necessarily
  *        mean only  you.  For  instance struct  ::RString instances  use these
  *        bits to cache their encodings  etc.  Devs discussed about this topic,
- *        reached their  concensus that  ::RUBY_T_DATA is  the only  valid data
+ *        reached their  consensus that  ::RUBY_T_DATA is  the only  valid data
  *        structure that  can use these  bits; other data  structures including
  *        ::RUBY_T_OBJECT  use these  bits  for their  own  purpose.  See  also
  *        https://bugs.ruby-lang.org/issues/18059
diff --git a/include/ruby/internal/intern/gc.h b/include/ruby/internal/intern/gc.h
index 1617a7cef62..d8e476b0782 100644
--- a/include/ruby/internal/intern/gc.h
+++ b/include/ruby/internal/intern/gc.h
@@ -249,7 +249,7 @@ void rb_gc(void); https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/intern/gc.h#L249
  *
  * @internal
  *
- * But isn't it  easier for you to call super,  and let `Object#intialize_copy`
+ * But isn't it  easier for you to call super,  and let `Object#initialize_copy`
  * call this function instead?
  */
 void rb_gc_copy_finalizer(VALUE dst, VALUE src);
diff --git a/include/ruby/internal/intern/thread.h b/include/ruby/internal/intern/thread.h
index 294e552fe9e..716375acd76 100644
--- a/include/ruby/internal/intern/thread.h
+++ b/include/ruby/internal/intern/thread.h
@@ -46,7 +46,7 @@ void rb_thread_schedule(void); https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/intern/thread.h#L46
  *
  * @param[in]  fd                    A file descriptor.
  * @exception  rb_eIOError           Closed stream.
- * @exception  rb_eSystemCalleError  Situations like EBADF.
+ * @exception  rb_eSystemCallError   Situations like EBADF.
  */
 int rb_thread_wait_fd(int fd);
 
@@ -56,7 +56,7 @@ int rb_thread_wait_fd(int fd); https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/intern/thread.h#L56
  *
  * @param[in]  fd                    A file descriptor.
  * @exception  rb_eIOError           Closed stream.
- * @exception  rb_eSystemCalleError  Situations like EBADF.
+ * @exception  rb_eSystemCallError   Situations like EBADF.
  */
 int rb_thread_fd_writable(int fd);
 
diff --git a/include/ruby/io.h b/include/ruby/io.h
index c117087d6a7..aac78465377 100644
--- a/include/ruby/io.h
+++ b/include/ruby/io.h
@@ -470,7 +470,7 @@ int rb_io_modestr_fmode(const char *modestr); https://github.com/ruby/ruby/blob/trunk/include/ruby/io.h#L470
 
 /**
  * Identical  to rb_io_modestr_fmode(),  except it  returns a  mixture of  `O_`
- * flags.  This for instnce returns `O_WRONLY | O_TRUNC | O_CREAT | O_EXCL` for
+ * flags.  This for instance returns `O_WRONLY | O_TRUNC | O_CREAT | O_EXCL` for
  * `"wx"`.
  *
  * @param[in]  modestr       File mode, in C's string.
@@ -735,8 +735,8 @@ int rb_io_extract_encoding_option(VALUE opt, rb_encoding **enc_p, rb_encoding ** https://github.com/ruby/ruby/blob/trunk/include/ruby/io.h#L735
  * class File
  *   def initialize: (
  *     (String | int)      path,
- *     ?(Strig | int)      fmode,
- *     ?(Strig | int)      perm,
+ *     ?(String | int)      fmode,
+ *     ?(String | int)      perm,
  *     ?mode:              (String | int),
  *     ?flags:             int,
  *     ?external_encoding: (Encoding | String),
diff --git a/include/ruby/ractor.h b/include/ruby/ractor.h
index 687ddcadecd..7811616f6d8 100644
--- a/include/ruby/ractor.h
+++ b/include/ruby/ractor.h
@@ -145,7 +145,7 @@ bool rb_ractor_local_storage_value_lookup(rb_ractor_local_key_t key, VALUE *val) https://github.com/ruby/ruby/blob/trunk/include/ruby/ractor.h#L145
  * Associates the passed value to the passed key.
  *
  * @param[in]  key  A ractor-local storage key.
- * @param[in]  val  Arbitary ruby object.
+ * @param[in]  val  Arbitrary ruby object.
  * @post       `val` corresponds to `key` in the current Ractor.
  */
 void  rb_ractor_local_storage_value_set(rb_ractor_local_key_t key, VALUE val);
diff --git a/misc/lldb_disasm.py b/misc/lldb_disasm.py
index b46d097910c..c02af52bc41 100644
--- a/misc/lldb_disasm.py
+++ b/misc/lldb_disasm.py
@@ -21,7 +21,7 @@ import lldb https://github.com/ruby/ruby/blob/trunk/misc/lldb_disasm.py#L21
 import os
 import shlex
 
-class IseqDissassembler:
+class IseqDisassembler:
     TS_VARIABLE = b'.'[0]
     TS_CALLDATA = b'C'[0]
     TS_CDHASH   = b'H'[0]
@@ -219,7 +219,7 @@ class IseqDissassembler: https://github.com/ruby/ruby/blob/trunk/misc/lldb_disasm.py#L219
             print('error getting insn name', error)
 
 def disasm(debugger, command, result, internal_dict):
-    disassembler = IseqDissassembler(debugger, command, result, internal_dict)
+    disassembler = IseqDisassembler(debugger, command, result, internal_dict)
     frame = disassembler.frame
 
     if frame.IsValid():
diff --git a/spec/ruby/core/complex/comparision_spec.rb b/spec/ruby/core/complex/comparision_spec.rb
deleted file mode 100644
index 2a437afb719..00000000000
--- a/spec/ruby/core/complex/comparision_spec.rb
+++ /dev/null
@@ -1,27 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/misc/lldb_disasm.py#L0
-require_relative '../../spec_helper'
-
-describe "Complex#<=>" do
-  ruby_version_is "2.7" do
-    it "returns nil if either self or argument has imaginary part" do
-      (Complex(5, 1) <=> Complex(2)).should be_nil
-      (Complex(1) <=> Complex(2, 1)).should be_nil
-      (5 <=> Complex(2, 1)).should be_nil
-    end
-
-    it "returns nil if argument is not numeric" do
-      (Complex(5, 1) <=> "cmp").should be_nil
-      (Complex(1) <=> "cmp").should be_nil
-      (Complex(1) <=> Object.new).should be_nil
-    end
-
-    it "returns 0, 1, or -1 if self and argument do not have imaginary part" do
-      (Complex(5) <=> Complex(2)).should == 1
-      (Complex(2) <=> Complex(3)).should == -1
-      (Complex(2) <=> Complex(2)).should == 0
-
-      (Complex(5) <=> 2).should == 1
-      (Complex(2) <=> 3).should == -1
-      (Complex(2) <=> 2).should == 0
-    end
-  end
-end
diff --git a/spec/ruby/core/complex/comparison_spec.rb b/spec/ruby/core/complex/comparison_spec.rb
new file mode 100644
index 00000000000..2a437afb719
--- /dev/null
+++ b/spec/ruby/core/complex/comparison_spec.rb
@@ -0,0 +1,27 @@ https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/complex/comparison_spec.rb#L1
+require_relative '../../spec_helper'
+
+describe "Complex#<=>" do
+  ruby_version_is "2.7" do
+    it "returns nil if either self or argument has imaginary part" do
+      (Complex(5, 1) <=> Complex(2)).should be_nil
+      (Complex(1) <=> Complex(2, 1)).should be_nil
+      (5 <=> Complex(2, 1)).should be_nil
+    end
+
+    it "returns nil if argument is not numeric" do
+      (Complex(5, 1) <=> "cmp").should be_nil
+      (Complex(1) <=> "cmp").should be_nil
+      (Complex(1) <=> Object.new).should be_nil
+    end
+
+    it "returns 0, 1, or -1 if self and argument do not have imaginary part" do
+      (Complex(5) <=> Complex(2)).should == 1
+      (Complex(2) <=> Compl (... truncated)

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

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