Skip to content

Commit

Permalink
Fix typos (#6963)
Browse files Browse the repository at this point in the history
  • Loading branch information
wooster0 authored and bcardiff committed Oct 22, 2018
1 parent e495121 commit fc52166
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/compiler/crystal/compiler.cr
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ module Crystal
# old one. Generating an `.o` file is what takes most time.
#
# However, instead of directly generating the final `.o` file
# from the `.bc` file, we generate it to a termporary name (`.o.tmp`)
# from the `.bc` file, we generate it to a temporary name (`.o.tmp`)
# and then we rename that file to `.o`. We do this because the compiler
# could be interrupted while the `.o` file is being generated, leading
# to a corrupted file that later would cause compilation issues.
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/crystal/semantic/method_lookup.cr
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ module Crystal
end
end

# If there's a restriction on a double splat, zero matching named arguments don't matc
# If there's a restriction on a double splat, zero matching named arguments don't match
if double_splat && double_splat_restriction &&
!double_splat_restriction.is_a?(DoubleSplat) && !found_unmatched_named_arg
return nil
Expand Down
2 changes: 1 addition & 1 deletion src/exception.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CallStack.skip(__FILE__)

# Represents errors that occur during application execution.
#
# Exception and it's descendants are used to communicate between raise and
# Exception and its descendants are used to communicate between raise and
# rescue statements in `begin ... end` blocks.
# Exception objects carry information about the exception – its type (the
# exception’s class name), an optional descriptive string, and
Expand Down
2 changes: 1 addition & 1 deletion src/file.cr
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ class File < IO::FileDescriptor
return "" if bytes[current] == SEPARATOR.ord

# otherwise the current_char is '.'
# if previous is '/', then the pattern is prefix/.foo and has no extension
# if previous is '/', then the pattern is prefix/.foo and has no extension
return "" if bytes[current - 1] == SEPARATOR.ord

# So the current char is '.',
Expand Down
2 changes: 1 addition & 1 deletion src/io/file_descriptor.cr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class IO::FileDescriptor < IO
include Crystal::System::FileDescriptor
include IO::Buffered

# The raw file-descriptor. It is defined to be an `Int`, but it's size is
# The raw file-descriptor. It is defined to be an `Int`, but its size is
# platform-specific.
getter fd

Expand Down
14 changes: 7 additions & 7 deletions src/io/stapled.cr
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ class IO::Stapled < IO

# Returns `true` if this `IO` is closed.
#
# Underlying ÌO`s might have a different status.
# Underlying `IO`s might have a different status.
getter? closed : Bool = false

# Creates a new `IO::Stapled` which reads from *reader* and writes to *writer*-
# Creates a new `IO::Stapled` which reads from *reader* and writes to *writer*.
def initialize(@reader : IO, @writer : IO, @sync_close : Bool = false)
end

Expand All @@ -43,7 +43,7 @@ class IO::Stapled < IO
@reader.gets(delimiter, limit, chomp)
end

# Peeks into *reader*.
# Peeks into `reader`.
def peek : Bytes?
check_open

Expand Down Expand Up @@ -73,7 +73,7 @@ class IO::Stapled < IO
@writer.write(slice)
end

# `Flushes `writer`.
# Flushes `writer`.
def flush : self
check_open

Expand All @@ -82,9 +82,9 @@ class IO::Stapled < IO
self
end

# Closes this ÌO`.
# Closes this `IO`.
#
# If `sync_close?` is `true`it will also close the underlying ÌO`s.
# If `sync_close?` is `true`, it will also close the underlying `IO`s.
def close : Nil
return if @closed
@closed = true
Expand All @@ -98,7 +98,7 @@ class IO::Stapled < IO
# Creates a pair of bidirectional pipe endpoints connected with each other
# and passes them to the given block.
#
# Both endpoints and the underlying ÌO`s are closed after the block
# Both endpoints and the underlying `IO`s are closed after the block
# (even if `sync_close?` is `false`).
def self.pipe(read_blocking : Bool = false, write_blocking : Bool = false)
IO.pipe(read_blocking, write_blocking) do |a_read, a_write|
Expand Down
2 changes: 1 addition & 1 deletion src/json/from_json.cr
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ end
# or other variations of [ISO 8601](http://xml.coverpages.org/ISO-FDIS-8601.pdf).
#
# The JSON format itself does not specify a time data type, this method just
# assumes that a string holding a ISO 8601 time format can be # interpreted as a
# assumes that a string holding a ISO 8601 time format can be interpreted as a
# time value.
#
# See `#to_json` for reference.
Expand Down
2 changes: 1 addition & 1 deletion src/process.cr
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ class Process
# process.
#
# Security: `chroot` on its own is not an effective means of mitigation. At minimum
# the process needs to also drop privilages as soon as feasible after the `chroot`.
# the process needs to also drop privileges as soon as feasible after the `chroot`.
# Changes to the directory hierarchy or file descriptors passed via `recvmsg(2)` from
# outside the `chroot` jail may allow a restricted process to escape, even if it is
# unprivileged.
Expand Down
2 changes: 1 addition & 1 deletion src/semantic_version.cr
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class SemanticVersion
end

identifiers.each_with_index do |item, i|
return 1 if i >= other.identifiers.size # larger = higher precedenc
return 1 if i >= other.identifiers.size # larger = higher precedence

oitem = other.identifiers[i]
r = compare item, oitem
Expand Down
4 changes: 2 additions & 2 deletions src/socket/addrinfo.cr
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ class Socket
# because different servers may handle the `mail` or `http` services for
# example.
# - *family* is optional and defaults to `Family::UNSPEC`
# - *type* is the intented socket type (e.g. `Type::STREAM`) and must be
# - *type* is the intended socket type (e.g. `Type::STREAM`) and must be
# specified.
# - *protocol* is the intented socket protocol (e.g. `Protocol::TCP`) and
# - *protocol* is the intended socket protocol (e.g. `Protocol::TCP`) and
# should be specified.
#
# Example:
Expand Down
8 changes: 4 additions & 4 deletions src/spec/expectations.cr
Original file line number Diff line number Diff line change
Expand Up @@ -343,25 +343,25 @@ module Spec
Spec::MatchExpectation.new(value)
end

# Creates an `Expectation` that passes if actual includes *expected* (`.includes?`).
# Creates an `Expectation` that passes if actual includes *expected* (`.includes?`).
# Works on collections and `String`.
def contain(expected)
Spec::ContainExpectation.new(expected)
end

# Creates an `Expectation` that passes if actual starts with *expected* (`.starts_with?`).
# Creates an `Expectation` that passes if actual starts with *expected* (`.starts_with?`).
# Works on `String`.
def start_with(expected)
Spec::StartWithExpectation.new(expected)
end

# Creates an `Expectation` that passes if actual ends with *expected* (`.ends_with?`).
# Creates an `Expectation` that passes if actual ends with *expected* (`.ends_with?`).
# Works on `String`.
def end_with(expected)
Spec::EndWithExpectation.new(expected)
end

# Creates an `Expectation` that passes if actual is empty (`.empty?`).
# Creates an `Expectation` that passes if actual is empty (`.empty?`).
def be_empty
Spec::BeEmptyExpectation.new
end
Expand Down
2 changes: 1 addition & 1 deletion src/string.cr
Original file line number Diff line number Diff line change
Expand Up @@ -3491,7 +3491,7 @@ class String
{@bytesize, @length}
end
else
# Iterate grpahemes to reverse the string,
# Iterate graphemes to reverse the string,
# so combining characters are placed correctly
String.new(bytesize) do |buffer|
buffer += bytesize
Expand Down
2 changes: 1 addition & 1 deletion src/time.cr
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ require "crystal/system/time"
# computer's wall clock has changed between both calls.
#
# As an alternative, the operating system also provides a monotonic clock.
# It's time-line has no specfied starting point but is strictly linearly
# Its time-line has no specfied starting point but is strictly linearly
# increasing.
#
# This monotonic clock should always be used for measuring elapsed time.
Expand Down
2 changes: 1 addition & 1 deletion src/tuple.cr
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ struct Tuple
end

# Returns `true` if this tuple has the same size as the other tuple
# and their elements are equal to each other when compared with `==`.
# and their elements are equal to each other when compared with `==`.
#
# ```
# t1 = {1, "hello"}
Expand Down
2 changes: 1 addition & 1 deletion src/zip/writer.cr
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Zip::Writer
# * If the STORED compression method is used, its crc32, compressed
# size and uncompressed size **must** be set and be correct with
# respect to the data that will be written to the yielded `IO`.
# * If the DEFLATED compression method is used, crc32, compresed
# * If the DEFLATED compression method is used, crc32, compressed
# size and uncompressed size will be computed from the data
# written to the yielded IO.
#
Expand Down

0 comments on commit fc52166

Please sign in to comment.