This commit is contained in:
Nobuyoshi Nakada 2021-11-02 18:29:53 +09:00
Родитель c2dcaa7362
Коммит a202408180
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7CD2805BFA3770C6
14 изменённых файлов: 19 добавлений и 19 удалений

Просмотреть файл

@ -348,7 +348,7 @@ clear_me2counter_i(VALUE key, VALUE value, VALUE unused)
* 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)

Просмотреть файл

@ -190,7 +190,7 @@ VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc)
* 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);

Просмотреть файл

@ -183,7 +183,7 @@ RB_GNUC_EXTENSION
* @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

Просмотреть файл

@ -249,7 +249,7 @@ void rb_gc(void);
*
* @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);

Просмотреть файл

@ -46,7 +46,7 @@ void rb_thread_schedule(void);
*
* @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);
*
* @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);

Просмотреть файл

@ -470,7 +470,7 @@ int rb_io_modestr_fmode(const char *modestr);
/**
* 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 **
* 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),

Просмотреть файл

@ -145,7 +145,7 @@ bool rb_ractor_local_storage_value_lookup(rb_ractor_local_key_t key, VALUE *val)
* 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);

Просмотреть файл

@ -21,7 +21,7 @@ import lldb
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:
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():

Просмотреть файл

@ -4,9 +4,9 @@ require_relative 'fixtures/classes'
describe "Struct#values_at" do
it "returns an array of values" do
clazz = Struct.new(:name, :director, :year)
movie = clazz.new('Sympathy for Mr. Vengence', 'Chan-wook Park', 2002)
movie.values_at(0, 1).should == ['Sympathy for Mr. Vengence', 'Chan-wook Park']
movie.values_at(0..2).should == ['Sympathy for Mr. Vengence', 'Chan-wook Park', 2002]
movie = clazz.new('Sympathy for Mr. Vengeance', 'Chan-wook Park', 2002)
movie.values_at(0, 1).should == ['Sympathy for Mr. Vengeance', 'Chan-wook Park']
movie.values_at(0..2).should == ['Sympathy for Mr. Vengeance', 'Chan-wook Park', 2002]
end
it "fails when passed unsupported types" do

Просмотреть файл

@ -9,7 +9,7 @@ describe :rational_divmod_rat, shared: true do
Rational(bignum_value, 4).divmod(Rational(4, 3)).should eql([1729382256910270464, Rational(0, 1)])
end
it "raises a ZeroDivisonError when passed a Rational with a numerator of 0" do
it "raises a ZeroDivisionError when passed a Rational with a numerator of 0" do
-> { Rational(7, 4).divmod(Rational(0, 3)) }.should raise_error(ZeroDivisionError)
end
end

Просмотреть файл

@ -56,7 +56,7 @@ class TestISeq < Test::Unit::TestCase
assert_equal [3, 4, 7, 9], lines(src)
end
def test_unsupport_type
def test_unsupported_type
ary = compile("p").to_a
ary[9] = :foobar
assert_raise_with_message(TypeError, /:foobar/) {ISeq.load(ary)}

Просмотреть файл

@ -219,7 +219,7 @@ End
assert_same(new_obj, found[0])
end
def test_each_object_no_gabage
def test_each_object_no_garbage
assert_separately([], <<-End)
GC.disable
eval('begin; 1.times{}; rescue; ensure; end')

Просмотреть файл

@ -158,7 +158,7 @@ typedef struct yjit_context
} ctx_t;
STATIC_ASSERT(yjit_ctx_size, sizeof(ctx_t) <= 32);
// Tuple of (iseq, idx) used to idenfity basic blocks
// Tuple of (iseq, idx) used to identify basic blocks
typedef struct BlockId
{
// Instruction sequence