Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions doc/string/rjust.rdoc
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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 <tt>width <= self.size</tt>, 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].
2 changes: 1 addition & 1 deletion doc/strscan/strscan.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion error.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
*
Expand Down
2 changes: 1 addition & 1 deletion internal/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
4 changes: 1 addition & 3 deletions string.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion zjit/src/asm/arm64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down