1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fixed misspellings

Fixed misspellings reported at [Bug #16437], only in ruby and rubyspec.
This commit is contained in:
Nobuyoshi Nakada 2019-12-20 09:19:39 +09:00
parent 2898367b3a
commit db16629008
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
45 changed files with 79 additions and 79 deletions

View file

@ -1732,7 +1732,7 @@ a = nil
test_ok(defined?(a))
test_ok(a == nil)
# multiple asignment
# multiple assignment
a, b = 1, 2
test_ok(a == 1 && b == 2)

View file

@ -6827,7 +6827,7 @@ delegate_call_p(const rb_iseq_t *iseq, unsigned int argc, const LINK_ANCHOR *arg
}
}
else {
goto fail; // level != 0 is unsupport
goto fail; // level != 0 is unsupported
}
}
else {

2
cont.c
View file

@ -2367,7 +2367,7 @@ rb_fiber_pool_initialize(int argc, VALUE* argv, VALUE self)
VALUE size = Qnil, count = Qnil, vm_stack_size = Qnil;
struct fiber_pool * fiber_pool = NULL;
// Maybe these should be keyworkd arguments.
// Maybe these should be keyword arguments.
rb_scan_args(argc, argv, "03", &size, &count, &vm_stack_size);
if (NIL_P(size)) {

View file

@ -90,7 +90,7 @@ sudo-precheck: test yes-test-testframework no-test-testframework
install-prereq: sudo-precheck
yes-test-all no-test-all: install
endif
# Cross referece needs to parse all files at once
# Cross reference needs to parse all files at once
love install reinstall: RDOCFLAGS = --force-update
$(srcdir)/missing/des_tables.c: $(srcdir)/missing/crypt.c

View file

@ -1,6 +1,6 @@
# ******** FOR DEVELEPERS ONLY ********
# Separate version.o into a shared library which varies every
# revisions, in order to make the rest sharable.
# revisions, in order to make the rest shareable.
include $(firstword $(wildcard GNUmakefile Makefile))

View file

@ -68,7 +68,7 @@ with all sufficient information, see the ChangeLog file or Redmine
* File.rename releases GVL. [Feature #13951]
* File::Stat#atime, File::Stat#mtime and File::Stat#ctime support fractional
second timestamps on Windows 8 and later. [Feature #13726]
* File::Stat#ino and File.indentical? support ReFS 128bit ino on Windows 8.1
* File::Stat#ino and File.identical? support ReFS 128bit ino on Windows 8.1
and later. [Feature #13731]
* File.readable?, File.readable_real?, File.writable?, File.writable_real?,
File.executable?, File.executable_real?, File.mkfifo, File.readlink,

View file

@ -389,7 +389,7 @@ When you're ready to commit:
This will open your editor in which you write your commit message.
Use the following style for commit messages:
* Use a succint subject line.
* Use a succinct subject line.
* Include reasoning behind the change in the commit message, focusing on why
the change is being made.
* Refer to redmine issue (such as Fixes [Bug #1234] or Implements

View file

@ -726,7 +726,7 @@ RUBY_TYPED_FREE_IMMEDIATELY ::
You can specify this flag if the dfree never unlocks Ruby's
internal lock (GVL).
If this flag is not set, Ruby defers invokation of dfree()
If this flag is not set, Ruby defers invocation of dfree()
and invokes dfree() at the same time as finalizers.
RUBY_TYPED_WB_PROTECTED ::

View file

@ -13,7 +13,7 @@ most frequently used with <code>ruby -e</code>.
Ruby does not require any indentation. Typically, ruby programs are indented
two spaces.
If you run ruby with warnings enabled and have an indentation mis-match, you
If you run ruby with warnings enabled and have an indentation mismatch, you
will receive a warning.
== +alias+

2
gc.c
View file

@ -86,7 +86,7 @@
#pragma intrinsic(_umul128)
#endif
/* Expecting this struct to be elminated by function inlinings */
/* Expecting this struct to be eliminated by function inlinings */
struct optional {
bool left;
size_t right;

View file

@ -47,7 +47,7 @@ typedef int int_type(ANYARGS);
/// @name Hooking global variables
/// @{
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Define a function-backended global variable.
/// @param[in] q Name of the variable.
/// @param[in] w Getter function.
@ -63,7 +63,7 @@ rb_define_virtual_variable(const char *q, type *w, void_type *e)
::rb_define_virtual_variable(q, r, t);
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Define a function-backended global variable.
/// @param[in] q Name of the variable.
/// @param[in] w Getter function.
@ -78,7 +78,7 @@ rb_define_virtual_variable(const char *q, rb_gvar_getter_t *w, void_type *e)
::rb_define_virtual_variable(q, w, t);
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Define a function-backended global variable.
/// @param[in] q Name of the variable.
/// @param[in] w Getter function.
@ -93,7 +93,7 @@ rb_define_virtual_variable(const char *q, type *w, rb_gvar_setter_t *e)
::rb_define_virtual_variable(q, r, e);
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Define a function-backended global variable.
/// @param[in] q Name of the variable.
/// @param[in] w Variable storage.
@ -110,7 +110,7 @@ rb_define_hooked_variable(const char *q, VALUE *w, type *e, void_type *r)
::rb_define_hooked_variable(q, w, t, y);
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Define a function-backended global variable.
/// @param[in] q Name of the variable.
/// @param[in] w Variable storage.
@ -126,7 +126,7 @@ rb_define_hooked_variable(const char *q, VALUE *w, rb_gvar_getter_t *e, void_typ
::rb_define_hooked_variable(q, w, e, y);
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Define a function-backended global variable.
/// @param[in] q Name of the variable.
/// @param[in] w Variable storage.
@ -146,7 +146,7 @@ rb_define_hooked_variable(const char *q, VALUE *w, type *e, rb_gvar_setter_t *r)
/// @name Exceptions and tag jumps
/// @{
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Old way to implement iterators.
/// @param[in] q A function that can yield.
/// @param[in] w Passed to `q`.
@ -163,7 +163,7 @@ rb_iterate(VALUE(*q)(VALUE), VALUE w, type *e, VALUE r)
return ::rb_iterate(q, w, t, r);
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Call a method with a block.
/// @param[in] q The self.
/// @param[in] w The method.
@ -181,7 +181,7 @@ rb_block_call(VALUE q, ID w, int e, const VALUE *r, type *t, VALUE y)
return ::rb_block_call(q, w, e, r, u, y);
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief An equivalent of `rescue` clause.
/// @param[in] q A function that can raise.
/// @param[in] w Passed to `q`.
@ -204,7 +204,7 @@ rb_rescue(type *q, VALUE w, type *e, VALUE r)
return ::rb_rescue(t, w, y, r);
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief An equivalent of `rescue` clause.
/// @param[in] q A function that can raise.
/// @param[in] w Passed to `q`.
@ -232,7 +232,7 @@ rb_rescue2(type *q, VALUE w, type *e, VALUE r, ...)
return ret;
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief An equivalent of `ensure` clause.
/// @param[in] q A function that can raise.
/// @param[in] w Passed to `q`.
@ -253,7 +253,7 @@ rb_ensure(type *q, VALUE w, type *e, VALUE r)
return ::rb_ensure(t, w, y, r);
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief An equivalent of `Kernel#catch`.
/// @param[in] q The "tag" string.
/// @param[in] w A function that can throw.
@ -272,7 +272,7 @@ rb_catch(const char *q, type *w, VALUE e)
return ::rb_catch(q, r, e);
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief An equivalent of `Kernel#catch`.
/// @param[in] q The "tag" object.
/// @param[in] w A function that can throw.
@ -295,7 +295,7 @@ rb_catch_obj(VALUE q, type *w, VALUE e)
/// @name Procs, Fibers and Threads
/// @{
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Creates a @ref rb_cFiber instance.
/// @param[in] q The fiber body.
/// @param[in] w Passed to `q`.
@ -311,7 +311,7 @@ rb_fiber_new(type *q, VALUE w)
return ::rb_fiber_new(e, w);
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Creates a @ref rb_cProc instance.
/// @param[in] q The proc body.
/// @param[in] w Passed to `q`.
@ -327,7 +327,7 @@ rb_proc_new(type *q, VALUE w)
return ::rb_proc_new(e, w);
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Creates a @ref rb_cThread instance.
/// @param[in] q The thread body.
/// @param[in] w Passed to `q`.
@ -348,7 +348,7 @@ rb_thread_create(type *q, void *w)
/// @name Hash and st_table
/// @{
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Iteration over the given table.
/// @param[in] q A table to scan.
/// @param[in] w A function to iterate.
@ -366,7 +366,7 @@ st_foreach(st_table *q, int_type *w, st_data_t e)
return ::st_foreach(q, r, e);
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Iteration over the given table.
/// @param[in] q A table to scan.
/// @param[in] w A function to iterate.
@ -384,7 +384,7 @@ st_foreach_check(st_table *q, int_type *w, st_data_t e, st_data_t)
return ::st_foreach_check(q, t, e, 0);
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Iteration over the given table.
/// @param[in] q A table to scan.
/// @param[in] w A function to iterate.
@ -400,7 +400,7 @@ st_foreach_safe(st_table *q, int_type *w, st_data_t e)
::st_foreach_safe(q, r, e);
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Iteration over the given hash.
/// @param[in] q A hash to scan.
/// @param[in] w A function to iterate.
@ -416,7 +416,7 @@ rb_hash_foreach(VALUE q, int_type *w, VALUE e)
::rb_hash_foreach(q, r, e);
}
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected")
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
/// @brief Iteration over each instance variable of the object.
/// @param[in] q An object.
/// @param[in] w A function to iterate.

4
iseq.c
View file

@ -932,7 +932,7 @@ iseq_load(VALUE data, const rb_iseq_t *parent, VALUE opt)
iseq_type = iseq_type_from_sym(type);
if (iseq_type == (enum iseq_type)-1) {
rb_raise(rb_eTypeError, "unsupport type: :%"PRIsVALUE, rb_sym2str(type));
rb_raise(rb_eTypeError, "unsupported type: :%"PRIsVALUE, rb_sym2str(type));
}
node_id = rb_hash_aref(misc, ID2SYM(rb_intern("node_id")));
@ -3404,7 +3404,7 @@ iseqw_s_load_from_binary_extra_data(VALUE self, VALUE str)
* To lookup the lineno of insn4, calculate rank("10100001", 8) = 3, so
* the line (B) is the entry in question.
*
* A naive implementatoin of succinct bit-vector works really well
* A naive implementation of succinct bit-vector works really well
* not only for large size but also for small size. However, it has
* tiny overhead for very small size. So, this implementation consist
* of two parts: one part is the "immediate" table that keeps rank result

View file

@ -419,7 +419,7 @@ Disables (or enables) all features.
.El
.Pp
.It Fl -dump Ns = Ns Ar target
Dump some informations.
Dump some information.
.Pp
Prints the specified target.
.Ar target

View file

@ -13,7 +13,7 @@
#
# (3) restart zsh.
#
# (4) geneate completion files once.
# (4) generate completion files once.
# generate-complete-function/ruby/optparse COMMAND1
# generate-complete-function/ruby/optparse COMMAND2
#

View file

@ -6472,7 +6472,7 @@ proc_setmaxgroups(VALUE obj, VALUE val)
int ngroups_max = get_sc_ngroups_max();
if (ngroups <= 0)
rb_raise(rb_eArgError, "maxgroups %d shold be positive", ngroups);
rb_raise(rb_eArgError, "maxgroups %d should be positive", ngroups);
if (ngroups > RB_MAX_GROUPS)
ngroups = RB_MAX_GROUPS;

View file

@ -1610,12 +1610,12 @@ static VALUE
range_count(int argc, VALUE *argv, VALUE range)
{
if (argc != 0) {
/* It is odd for instace (1...).count(0) to return Infinity. Just let
/* It is odd for instance (1...).count(0) to return Infinity. Just let
* it loop. */
return rb_call_super(argc, argv);
}
else if (rb_block_given_p()) {
/* Likewise it is odd for instace (1...).count {|x| x == 0 } to return
/* Likewise it is odd for instance (1...).count {|x| x == 0 } to return
* Infinity. Just let it loop. */
return rb_call_super(argc, argv);
}

View file

@ -4663,7 +4663,7 @@ parse_char_class(Node** np, Node** asc_np, OnigToken* tok, UChar** src, UChar* e
p = psave;
for (i = 1; i < len; i++) {
(void)fetch_token_in_cc(tok, &p, end, env);
/* no need to check the retun value (already checked above) */
/* no need to check the return value (already checked above) */
}
fetched = 0;
}

View file

@ -31,7 +31,7 @@ class TupleSpace
def initialize
@que = {}
@waiting = {}
@que.taint # enable tainted comunication
@que.taint # enable tainted communication
@waiting.taint
self.taint
end

View file

@ -20,7 +20,7 @@ The algorithm is the obvious loop "32.upto(126){|x| putc x}".
It is not so hard to transform it to use each character *at most once*. The only slight difficulty comes from the constraint that we cannot "declare and then use" variables, because then the code will contain the variable name twice. This restriction is worked around by the $. global variable, the best friend of Ruby golfers.
The relatively interesting part is to use all the charcters *at least once*. Of course, this is easily accomplished by putting everything into a comment (i.e., #unused...) or to a string literal (%(unused...), note that normal string literals are forbidden since they use quotation marks twice). Hey, but that's not fun at all! I tried to minimize the escapeway.
The relatively interesting part is to use all the characters *at least once*. Of course, this is easily accomplished by putting everything into a comment (i.e., #unused...) or to a string literal (%(unused...), note that normal string literals are forbidden since they use quotation marks twice). Hey, but that's not fun at all! I tried to minimize the escapeway.
* "@THEqQUICKbBROWNfFXjJMPSvVLAZYDGgkyz". Trash box of unused alphabet. I wish I could have used "gkyz" somewhere else.

View file

@ -199,6 +199,6 @@ succeed to return 0. The meaning of ``\1nn`` in regular expression
seems to depend on the existence of capturing expressions.
In spite of these Ruby's behaviors, we have a good news! The present
SAT sover does not suffer from the issues because the program cannot
SAT solver does not suffer from the issues because the program cannot
return solutions in practical time for inputs with variables more than
40.

View file

@ -22,7 +22,7 @@ describe "ARGF.binmode" do
end
end
it "puts alls subsequent stream reading through ARGF into binmode" do
it "puts all subsequent streams reading through ARGF into binmode" do
argf [@bin_file, @bin_file] do
@argf.binmode
@argf.gets.should == "test\r\n"

View file

@ -30,7 +30,7 @@ describe "ENV.delete" do
ScratchPad.recorded.should == "foo"
end
it "does not evaluate the block if the envirionment variable exists" do
it "does not evaluate the block if the environment variable exists" do
ENV["foo"] = "bar"
ENV.delete("foo") { |name| fail "Should not happen" }
ENV["foo"].should == nil

View file

@ -105,7 +105,7 @@ describe "File.chmod" do
File.chmod(0, mock_to_path(@file))
end
it "throws a TypeError if the given path is not coercable into a string" do
it "throws a TypeError if the given path is not coercible into a string" do
-> { File.chmod(0, []) }.should raise_error(TypeError)
end

View file

@ -174,7 +174,7 @@ describe "Integer#<=>" do
(infinity_value <=> Float::MAX.to_i*2).should == 1
end
it "returns -1 when self is negative and other is Infinty" do
it "returns -1 when self is negative and other is Infinity" do
(-Float::MAX.to_i*2 <=> infinity_value).should == -1
end

View file

@ -52,7 +52,7 @@ describe :kernel_singleton_methods_modules, shared: true do
end
describe :kernel_singleton_methods_supers, shared: true do
it "returns the names of singleton methods for an object extented with a module" do
it "returns the names of singleton methods for an object extended with a module" do
ReflectSpecs.oe.singleton_methods(*@object).should include(:m_pro, :m_pub)
end
@ -62,11 +62,11 @@ describe :kernel_singleton_methods_supers, shared: true do
r.should == [:pro, :pub]
end
it "returns the names of singleton methods for an object extented with two modules" do
it "returns the names of singleton methods for an object extended with two modules" do
ReflectSpecs.oee.singleton_methods(*@object).should include(:m_pro, :m_pub, :n_pro, :n_pub)
end
it "returns the names of singleton methods for an object extented with a module including a module" do
it "returns the names of singleton methods for an object extended with a module including a module" do
ReflectSpecs.oei.singleton_methods(*@object).should include(:n_pro, :n_pub, :m_pro, :m_pub)
end
@ -112,7 +112,7 @@ describe :kernel_singleton_methods_private_supers, shared: true do
ReflectSpecs.oee.singleton_methods(*@object).should_not include(:m_pri)
end
it "does not return private singleton methods for an object extented with a module including a module" do
it "does not return private singleton methods for an object extended with a module including a module" do
ReflectSpecs.oei.singleton_methods(*@object).should_not include(:n_pri, :m_pri)
end
@ -165,11 +165,11 @@ describe "Kernel#singleton_methods" do
it_behaves_like :kernel_singleton_methods_modules, nil, false
it_behaves_like :kernel_singleton_methods_private_supers, nil, false
it "returns an empty Array for an object extented with a module" do
it "returns an empty Array for an object extended with a module" do
ReflectSpecs.oe.singleton_methods(false).should == []
end
it "returns an empty Array for an object extented with two modules" do
it "returns an empty Array for an object extended with two modules" do
ReflectSpecs.oee.singleton_methods(false).should == []
end

View file

@ -23,7 +23,7 @@ describe "Module#autoload?" do
ModuleSpecs::Autoload::Child.autoload?(:InheritedAutoload, false).should be_nil
end
it "returns the name of the file that will be loaded if recursion is disabled but the autoload is defined on the classs itself" do
it "returns the name of the file that will be loaded if recursion is disabled but the autoload is defined on the class itself" do
ModuleSpecs::Autoload::Child.autoload :ChildAutoload, "child_autoload.rb"
ModuleSpecs::Autoload::Child.autoload?(:ChildAutoload, false).should == "child_autoload.rb"
end

View file

@ -38,7 +38,7 @@ ruby_version_is '2.5' do
].should be_computed_by(:undump)
end
it "returns a string with unescaped sequencies \" and \\" do
it "returns a string with unescaped sequences \" and \\" do
[ ['"\\""' , "\""],
['"\\\\"', "\\"]
].should be_computed_by(:undump)

View file

@ -298,7 +298,7 @@ ruby_version_is "2.6" do
# At loading marshaled data, a timezone name will be converted to a timezone object
# by find_timezone class method, if the method is defined.
# Similary, that class method will be called when a timezone argument does not have
# Similarly, that class method will be called when a timezone argument does not have
# the necessary methods mentioned above.
context "subject's class implements .find_timezone method" do
it "calls .find_timezone to build a time object at loading marshaled data" do

View file

@ -104,7 +104,7 @@ describe "Regexps with modifiers" do
/./m.match("\n").to_a.should == ["\n"]
end
it "supports ASII/Unicode modifiers" do
it "supports ASCII/Unicode modifiers" do
eval('/(?a)[[:alpha:]]+/').match("a\u3042").to_a.should == ["a"]
eval('/(?d)[[:alpha:]]+/').match("a\u3042").to_a.should == ["a\u3042"]
eval('/(?u)[[:alpha:]]+/').match("a\u3042").to_a.should == ["a\u3042"]

View file

@ -64,7 +64,7 @@ describe "Socket::IPSocket#recvfrom" do
data.size.should == 2
data.first.should == "hel"
# This does not apply to every platform, dependant on recvfrom(2)
# This does not apply to every platform, dependent on recvfrom(2)
# data.last.should == nil
end
end

View file

@ -220,7 +220,7 @@ describe "C-API IO function" do
end
describe "rb_io_check_writable" do
it "does not raise an exeption if the IO is opened for writing" do
it "does not raise an exception if the IO is opened for writing" do
# The MRI function is void, so we use should_not raise_error
-> { @o.rb_io_check_writable(@w_io) }.should_not raise_error
end

2
st.c
View file

@ -714,7 +714,7 @@ st_free_table(st_table *tab)
free(tab);
}
/* Return byte size of memory allocted for table TAB. */
/* Return byte size of memory allocated for table TAB. */
size_t
st_memsize(const st_table *tab)
{

View file

@ -26,7 +26,7 @@ class TestPopenDeadlock < Test::Unit::TestCase
end
private :assert_popen_without_deadlock
# 10 test methods are defined for showing progess reports
# 10 test methods are defined for showing progress reports
10.times do |i|
define_method("test_popen_without_deadlock_#{i}") {
assert_popen_without_deadlock

View file

@ -353,7 +353,7 @@ class Sentence
# * No rule derives to empty sequence
# * Underivable rule simplified
# * No channel rule
# * Symbols which has zero or one choices are not appered in rhs.
# * Symbols which has zero or one choices are not appeared in rhs.
#
# Note that the rules which can derive empty and non-empty
# sequences are modified to derive only non-empty sequences.

View file

@ -456,7 +456,7 @@ class TestAssignment < Test::Unit::TestCase
assert(defined?(a))
assert_nil(a)
# multiple asignment
# multiple assignment
a, b = 1, 2
assert_equal 1, a
assert_equal 2, b

View file

@ -113,7 +113,7 @@ module TestStruct
assert_equal @Struct::KeywordInitTrue.new(a: 1, b: 2).values, @Struct::KeywordInitFalse.new(1, 2).values
assert_equal "#{@Struct}::KeywordInitFalse", @Struct::KeywordInitFalse.inspect
assert_equal "#{@Struct}::KeywordInitTrue(keyword_init: true)", @Struct::KeywordInitTrue.inspect
# eval is neede to prevent the warning duplication filter
# eval is needed to prevent the warning duplication filter
k = eval("Class.new(@Struct::KeywordInitFalse) {def initialize(**) end}")
assert_warn(/The last argument is used as the keyword parameter/) {k.new(a: 1, b: 2)}
k = Class.new(@Struct::KeywordInitTrue) {def initialize(**) end}

2
time.c
View file

@ -5801,7 +5801,7 @@ rb_time_zone_abbreviation(VALUE zone, VALUE time)
* At loading marshaled data, a timezone name will be converted to a timezone
* object by +find_timezone+ class method, if the method is defined.
*
* Similary, that class method will be called when a timezone argument does
* Similarly, that class method will be called when a timezone argument does
* not have the necessary methods mentioned above.
*/

View file

@ -80,7 +80,7 @@ module TracePointChecker
call_stack.push method
STATE[:count] += 1
verbose_out :psuh, method if verbose
verbose_out :push, method if verbose
}
TRACES << TracePoint.new(*return_events){|tp|

View file

@ -97,7 +97,7 @@ class String
end
class StringScanner
# lx: limit of x (colmns of screen)
# lx: limit of x (columns of screen)
# ly: limit of y (rows of screen)
def getrows(lx, ly)
cp1 = charpos
@ -349,7 +349,7 @@ eom
i["custom_fields"].each do |x|
sio.puts "%-10s: %s" % [x["name"], x["value"]]
end
#res["attachements"].each do |x|
#res["attachments"].each do |x|
#end
sio.puts i["description"]
sio.puts

6
vm.c
View file

@ -3014,12 +3014,12 @@ Init_VM(void)
* For example, we can create a new thread separate from the main thread's
* execution using ::new.
*
* thr = Thread.new { puts "Whats the big deal" }
* thr = Thread.new { puts "What's the big deal" }
*
* Then we are able to pause the execution of the main thread and allow
* our new thread to finish, using #join:
*
* thr.join #=> "Whats the big deal"
* thr.join #=> "What's the big deal"
*
* If we don't call +thr.join+ before the main thread terminates, then all
* other threads including +thr+ will be killed.
@ -3028,7 +3028,7 @@ Init_VM(void)
* once, like in the following example:
*
* threads = []
* threads << Thread.new { puts "Whats the big deal" }
* threads << Thread.new { puts "What's the big deal" }
* threads << Thread.new { 3.times { puts "Threads are fun!" } }
*
* After creating a few threads we wait for them all to finish

View file

@ -349,7 +349,7 @@ vm_stack_dump_each(const rb_execution_context_t *ec, const rb_control_frame_t *c
}
}
else {
rb_bug("unsupport frame type: %08lx", VM_FRAME_TYPE(cfp));
rb_bug("unsupported frame type: %08lx", VM_FRAME_TYPE(cfp));
}
}
#endif

View file

@ -165,7 +165,7 @@ vm_check_frame_detail(VALUE type, int req_block, int req_me, int req_cref, VALUE
if ((type & VM_FRAME_MAGIC_MASK) == VM_FRAME_MAGIC_DUMMY) {
VM_ASSERT(iseq == NULL ||
RUBY_VM_NORMAL_ISEQ_P(iseq) /* argument error. it shold be fixed */);
RUBY_VM_NORMAL_ISEQ_P(iseq) /* argument error. it should be fixed */);
}
else {
VM_ASSERT(is_cframe == !RUBY_VM_NORMAL_ISEQ_P(iseq));
@ -226,7 +226,7 @@ vm_check_canary(const rb_execution_context_t *ec, VALUE *sp)
return;
}
else {
/* we are going to call metods below; squash the canary to
/* we are going to call methods below; squash the canary to
* prevent infinite loop. */
sp[0] = Qundef;
}
@ -1334,7 +1334,7 @@ vm_throw_start(const rb_execution_context_t *ec, rb_control_frame_t *const reg_c
/* do nothing */
}
else {
rb_bug("isns(throw): unsupport throw type");
rb_bug("isns(throw): unsupported throw type");
}
ec->tag->state = state;
@ -1536,7 +1536,7 @@ rb_vm_search_method_slowpath(struct rb_call_data *cd, VALUE klass)
* - It scans the array from left to right, looking for the expected class
* serial. If it finds that at `cc->class_serial[0]` (this branch
* probability is 98% according to @shyouhei's experiment), just returns
* true. If it reaches the end of the array without finding anytihng,
* true. If it reaches the end of the array without finding anything,
* returns false. This is done in the #1 loop below.
*
* - What needs to be complicated is when the class serial is found at either

View file

@ -552,7 +552,7 @@ rb_file_expand_path_internal(VALUE fname, VALUE dname, int abs_mode, int long_na
/* Determine require buffer size */
size = GetFullPathNameW(buffer, PATH_BUFFER_SIZE, wfullpath_buffer, NULL);
if (size > PATH_BUFFER_SIZE) {
/* allocate more memory than alloted originally by PATH_BUFFER_SIZE */
/* allocate more memory than allotted originally by PATH_BUFFER_SIZE */
wfullpath = ALLOC_N(wchar_t, size);
size = GetFullPathNameW(buffer, size, wfullpath, NULL);
}