diff --git a/doc/string/rjust.rdoc b/doc/string/rjust.rdoc index 24e7bf31595653..864cfcce7a0ec0 100644 --- a/doc/string/rjust.rdoc +++ b/doc/string/rjust.rdoc @@ -1,7 +1,7 @@ Returns a right-justified copy of +self+. -If integer argument +size+ is greater than the size (in characters) of +self+, -returns a new string of length +size+ that is a copy of +self+, +If integer argument +width+ is greater than the size (in characters) of +self+, +returns a new string of length +width+ that is a copy of +self+, right justified and padded on the left with +pad_string+: 'hello'.rjust(10) # => " hello" @@ -10,7 +10,9 @@ right justified and padded on the left with +pad_string+: 'тест'.rjust(10) # => " тест" 'こんにちは'.rjust(10) # => " こんにちは" -If +size+ is not greater than the size of +self+, returns a copy of +self+: +If width <= self.size, returns a copy of +self+: 'hello'.rjust(5, 'ab') # => "hello" 'hello'.rjust(1, 'ab') # => "hello" + +Related: see {Converting to New String}[rdoc-ref:String@Converting+to+New+String]. diff --git a/doc/strscan/strscan.md b/doc/strscan/strscan.md index aa7bd8ba847d82..c0bf5413623b07 100644 --- a/doc/strscan/strscan.md +++ b/doc/strscan/strscan.md @@ -204,7 +204,7 @@ put_situation(scanner) ## Target Substring -The target substring is the the part of the [stored string][1] +The target substring is the part of the [stored string][1] that extends from the current [byte position][2] to the end of the stored string; it is always either: diff --git a/error.c b/error.c index 2f24929d44ea91..abf50b696aefa6 100644 --- a/error.c +++ b/error.c @@ -1686,7 +1686,7 @@ check_order_keyword(VALUE opt) * - If the value of keyword +order+ is +:top+ (the default), * lists the error message and the innermost backtrace entry first. * - If the value of keyword +order+ is +:bottom+, - * lists the error message the the innermost entry last. + * lists the error message the innermost entry last. * * Example: * diff --git a/internal/io.h b/internal/io.h index e6a741ee71faee..b81774e0a715df 100644 --- a/internal/io.h +++ b/internal/io.h @@ -132,7 +132,7 @@ struct rb_io { struct rb_execution_context_struct *closing_ec; VALUE wakeup_mutex; - // The fork generation of the the blocking operations list. + // The fork generation of the blocking operations list. rb_serial_t fork_generation; }; diff --git a/string.c b/string.c index f797dab6516f8d..fab1509bac0ead 100644 --- a/string.c +++ b/string.c @@ -11177,12 +11177,10 @@ rb_str_ljust(int argc, VALUE *argv, VALUE str) /* * call-seq: - * rjust(size, pad_string = ' ') -> new_string + * rjust(width, pad_string = ' ') -> new_string * * :include: doc/string/rjust.rdoc * - * Related: String#ljust, String#center. - * */ static VALUE diff --git a/zjit/src/asm/arm64/mod.rs b/zjit/src/asm/arm64/mod.rs index beb5a4b7bd61c7..ffb83cf16abd03 100644 --- a/zjit/src/asm/arm64/mod.rs +++ b/zjit/src/asm/arm64/mod.rs @@ -18,7 +18,7 @@ pub use arg::*; pub use opnd::*; /// The extend type for register operands in extended register instructions. -/// It's the reuslt size is determined by the the destination register and +/// It's the result size is determined by the destination register and /// the source size interpreted using the last letter. #[derive(Clone, Copy)] pub enum ExtendType {