Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typos in various files #15080

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion spec/std/http/request_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ module HTTP
request.form_params["test"].should eq("foobar")
end

it "returns ignors invalid content-type" do
it "ignores invalid content-type" do
request = Request.new("POST", "/form", nil, HTTP::Params.encode({"test" => "foobar"}))
request.form_params?.should eq(nil)
request.form_params.size.should eq(0)
Expand Down
2 changes: 1 addition & 1 deletion spec/std/io/delimited_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ describe "IO::Delimited" do
io.gets_to_end.should eq("hello")
end

it "handles the case of peek matching first byte, not having enough room, but later not matching (limted slice)" do
it "handles the case of peek matching first byte, not having enough room, but later not matching (limited slice)" do
# not a delimiter
# ---
io = MemoryIOWithFixedPeek.new("abcdefgwijkfghhello")
Expand Down
2 changes: 1 addition & 1 deletion spec/std/regex_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ describe "Regex" do
})
end

it "alpanumeric" do
it "alphanumeric" do
/(?<f1>)/.name_table.should eq({1 => "f1"})
end

Expand Down
4 changes: 2 additions & 2 deletions spec/std/time/span_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -360,15 +360,15 @@ describe Time::Span do
1.1.weeks.should eq(7.7.days)
end

it "can substract big amount using microseconds" do
it "can subtract big amount using microseconds" do
jan_1_2k = Time.utc(2000, 1, 1)
past = Time.utc(5, 2, 3, 0, 0, 0)
delta = (past - jan_1_2k).total_microseconds.to_i64
past2 = jan_1_2k + delta.microseconds
past2.should eq(past)
end

it "can substract big amount using milliseconds" do
it "can subtract big amount using milliseconds" do
jan_1_2k = Time.utc(2000, 1, 1)
past = Time.utc(5, 2, 3, 0, 0, 0)
delta = (past - jan_1_2k).total_milliseconds.to_i64
Expand Down
2 changes: 1 addition & 1 deletion spec/std/yaml/serializable_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ describe "YAML::Serializable" do
yaml = YAMLAttrWithPresenceAndIgnoreSerialize.from_yaml(%({"last_name": null}))
yaml.last_name_present?.should be_true

# libyaml 0.2.5 removes traling space for empty scalar nodes
# libyaml 0.2.5 removes trailing space for empty scalar nodes
if YAML.libyaml_version >= SemanticVersion.new(0, 2, 5)
yaml.to_yaml.should eq("---\nlast_name:\n")
else
Expand Down
2 changes: 1 addition & 1 deletion src/channel/select.cr
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class Channel(T)

private def self.each_skip_duplicates(ops_locks, &)
# Avoid deadlocks from trying to lock the same lock twice.
# `ops_lock` is sorted by `lock_object_id`, so identical onces will be in
# `ops_lock` is sorted by `lock_object_id`, so identical ones will be in
# a row and we skip repeats while iterating.
last_lock_id = nil
ops_locks.each do |op|
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/crystal/types.cr
Original file line number Diff line number Diff line change
Expand Up @@ -1389,10 +1389,10 @@ module Crystal
# Float64 mantissa has 52 bits
case kind
when .i8?, .u8?, .i16?, .u16?
# Less than 23 bits, so convertable to Float32 and Float64 without precision loss
# Less than 23 bits, so convertible to Float32 and Float64 without precision loss
true
when .i32?, .u32?
# Less than 52 bits, so convertable to Float64 without precision loss
# Less than 52 bits, so convertible to Float64 without precision loss
other_type.kind.f64?
else
false
Expand Down
2 changes: 1 addition & 1 deletion src/crystal/system/win32/event_loop_iocp.cr
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Crystal::IOCP::EventLoop < Crystal::EventLoop

# Wait for completion timed out but it may have been interrupted or we ask
# for immediate timeout (nonblocking), so we check for the next event
# readyness again:
# readiness again:
return false if next_event.wake_at > Time.monotonic
end

Expand Down
2 changes: 1 addition & 1 deletion src/docs_pseudo_methods.cr
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,6 @@ end
struct CRYSTAL_PSEUDO__NoReturn
end

# Similar in usage to `Nil`. `Void` is prefered for C lib bindings.
# Similar in usage to `Nil`. `Void` is preferred for C lib bindings.
struct CRYSTAL_PSEUDO__Void
end
2 changes: 1 addition & 1 deletion src/file.cr
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class File < IO::FileDescriptor
# *blocking* must be set to `false` on POSIX targets when the file to open
# isn't a regular file but a character device (e.g. `/dev/tty`) or fifo. These
# files depend on another process or thread to also be reading or writing, and
# system event queues will properly report readyness.
# system event queues will properly report readiness.
#
# *blocking* may also be set to `nil` in which case the blocking or
# non-blocking flag will be determined automatically, at the expense of an
Expand Down
2 changes: 1 addition & 1 deletion src/gc/none.cr
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ module GC
# will block until it can acquire the lock).
#
# In both cases there can't be a deadlock since we won't suspend another
# thread until it has successfuly added (or removed) itself to (from) the
# thread until it has successfully added (or removed) itself to (from) the
# linked list and released the lock, and the other thread won't progress until
# it can add (or remove) itself from the list.
#
Expand Down
Loading