diff --git a/CHANGELOG.md b/CHANGELOG.md index 621699a07a92..da02a193c68c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -520,8 +520,8 @@ - Fixed indent after comment inside indexer. ([#8627](https://github.com/crystal-lang/crystal/pull/8627), thanks @asterite) - Fixed indent of comments at the end of a proc literal. ([#8778](https://github.com/crystal-lang/crystal/pull/8778), thanks @asterite) -- Fixed crash when formating comment after macro. ([#8697](https://github.com/crystal-lang/crystal/pull/8697), thanks @asterite) -- Fixed crash when formating `exp.!`. ([#8768](https://github.com/crystal-lang/crystal/pull/8768), thanks @asterite) +- Fixed crash when formatting comment after macro. ([#8697](https://github.com/crystal-lang/crystal/pull/8697), thanks @asterite) +- Fixed crash when formatting `exp.!`. ([#8768](https://github.com/crystal-lang/crystal/pull/8768), thanks @asterite) - Removes unnecessary escape sequences. ([#8619](https://github.com/crystal-lang/crystal/pull/8619), thanks @RX14) ### Doc generator @@ -3493,7 +3493,7 @@ * Added `IO#gets_to_end`. * Added backticks (`...`) and `%x(...)` for command execution. * Added `%r(...)` for regular expression literals. -* Allow interpolations in regular expresion literals. +* Allow interpolations in regular expression literals. * Compiling with `--release` sets a `release` flag that you can test with `ifdef`. * Allow passing splats to C functions * A C type can now be declared like `type Name = Type` (`type Name : Type` will be deprecated). diff --git a/spec/compiler/semantic/class_var_spec.cr b/spec/compiler/semantic/class_var_spec.cr index 1a266f14bf6c..f263b2abd6d3 100644 --- a/spec/compiler/semantic/class_var_spec.cr +++ b/spec/compiler/semantic/class_var_spec.cr @@ -437,7 +437,7 @@ describe "Semantic: class var" do )) { int32 } end - it "doesn't error on recursive depdendency if var is nilable (#2943)" do + it "doesn't error on recursive dependency if var is nilable (#2943)" do assert_type(%( class Foo @@foo : Int32? diff --git a/spec/compiler/semantic/reflection_spec.cr b/spec/compiler/semantic/reflection_spec.cr index f9bb33d8119d..2d79a19f6b61 100644 --- a/spec/compiler/semantic/reflection_spec.cr +++ b/spec/compiler/semantic/reflection_spec.cr @@ -9,7 +9,7 @@ describe "Semantic: reflection" do assert_type("Class") { types["Class"] } end - it "types Object and Class metaclases" do + it "types Object and Class metaclasses" do assert_type("Object.class") { types["Class"] } assert_type("Class.class") { types["Class"] } end diff --git a/spec/generate_windows_spec.sh b/spec/generate_windows_spec.sh index 046b6b64ca23..3cb1f4ebf0f0 100644 --- a/spec/generate_windows_spec.sh +++ b/spec/generate_windows_spec.sh @@ -6,7 +6,7 @@ set +x # * `failed codegen` annotates specs that error in the compiler. # This is mostly caused by some API not being ported to win32 (either the spec # target itself or some tools used by the spec). -# * `failed linking` annotats specs that compile but don't link (at least not on +# * `failed linking` annotates specs that compile but don't link (at least not on # basis of the libraries from *Porting to Windows* guide). # Most failers are caused by missing libraries (libxml2, libyaml, libgmp, # libllvm, libz, libssl), but there also seem to be some incompatibilities diff --git a/src/channel.cr b/src/channel.cr index 500960b8c9f9..3d6a47122a8c 100644 --- a/src/channel.cr +++ b/src/channel.cr @@ -187,7 +187,7 @@ class Channel(T) # All items successfully sent to the channel can be received, before `#receive` considers the channel closed. # Calling `#close` on a closed channel does not have any effect. # - # It returns `true` when the channel was successfuly closed, or `false` if it was already closed. + # It returns `true` when the channel was successfully closed, or `false` if it was already closed. def close : Bool sender_list = Crystal::PointerLinkedList(Sender(T)).new receiver_list = Crystal::PointerLinkedList(Receiver(T)).new diff --git a/src/compiler/crystal/codegen/call.cr b/src/compiler/crystal/codegen/call.cr index 567107050686..4016827f50d5 100644 --- a/src/compiler/crystal/codegen/call.cr +++ b/src/compiler/crystal/codegen/call.cr @@ -25,7 +25,7 @@ class Crystal::CodeGenVisitor return false if @builder.end if block = node.block - # A block might turn into a proc literal but not be used if it particpates in a dispatch + # A block might turn into a proc literal but not be used if it participates in a dispatch if (fun_literal = block.fun_literal) && node.target_def.uses_block_arg? codegen_call_with_block_as_fun_literal(node, fun_literal, owner, call_args) else diff --git a/src/compiler/crystal/codegen/primitives.cr b/src/compiler/crystal/codegen/primitives.cr index 13ae41ea4f04..5c7a00bd8bcd 100644 --- a/src/compiler/crystal/codegen/primitives.cr +++ b/src/compiler/crystal/codegen/primitives.cr @@ -736,7 +736,7 @@ class Crystal::CodeGenVisitor def codegen_primitive_pointer_set(node, target_def, call_args) type = context.type.remove_typedef.as(PointerInstanceType) - # Assinging to a Pointer(Void) has no effect + # Assigning to a Pointer(Void) has no effect return llvm_nil if type.element_type.void? value = call_args[1] diff --git a/src/compiler/crystal/macros.cr b/src/compiler/crystal/macros.cr index ad26ceb38429..eaa57510e2a4 100644 --- a/src/compiler/crystal/macros.cr +++ b/src/compiler/crystal/macros.cr @@ -1615,7 +1615,7 @@ module Crystal::Macros # class MagicConstant < ASTNode # end - # A fictitious node representing an idenfitifer like, `foo`, `Bar` or `something_else`. + # A fictitious node representing an identifier like, `foo`, `Bar` or `something_else`. # # The parser doesn't create this nodes. Instead, you create them by invoking `id` # on some nodes. For example, invoking `id` on a `StringLiteral` returns a `MacroId` diff --git a/src/compiler/crystal/semantic.cr b/src/compiler/crystal/semantic.cr index b7ac36231e59..931781631bd1 100644 --- a/src/compiler/crystal/semantic.cr +++ b/src/compiler/crystal/semantic.cr @@ -4,7 +4,7 @@ require "./syntax/visitor" require "./semantic/*" # The overall algorithm for semantic analysis of a program is: -# - top level: declare clases, modules, macros, defs and other top-level stuff +# - top level: declare classes, modules, macros, defs and other top-level stuff # - new methods: create `new` methods for every `initialize` method # - type declarations: process type declarations like `@x : Int32` # - check abstract defs: check that abstract defs are implemented diff --git a/src/compiler/crystal/semantic/call.cr b/src/compiler/crystal/semantic/call.cr index 3c69bfb6ecac..6e11c94dd8f2 100644 --- a/src/compiler/crystal/semantic/call.cr +++ b/src/compiler/crystal/semantic/call.cr @@ -131,7 +131,7 @@ class Crystal::Call named_args_types = NamedArgumentType.from_args(named_args, with_literals) matches = lookup_matches_without_splat arg_types, named_args_types, with_literals - # If we checked for automatic casts, see if an ambigous call was produced + # If we checked for automatic casts, see if an ambiguous call was produced if with_literals arg_types.each &.check_restriction_exception named_args_types.try &.each &.type.check_restriction_exception diff --git a/src/compiler/crystal/semantic/exhaustiveness_checker.cr b/src/compiler/crystal/semantic/exhaustiveness_checker.cr index f481e1f202df..bc06f3b8dce2 100644 --- a/src/compiler/crystal/semantic/exhaustiveness_checker.cr +++ b/src/compiler/crystal/semantic/exhaustiveness_checker.cr @@ -16,7 +16,7 @@ struct Crystal::ExhaustivenessChecker cond_type = cond.type? # No type on condition means we couldn't type it so we can't - # check exhasutiveness. + # check exhaustiveness. return unless cond_type # Compute all types that we must cover. @@ -99,7 +99,7 @@ struct Crystal::ExhaustivenessChecker elements = cond.elements # No type on condition means we couldn't type it so we can't - # check exhasutiveness. + # check exhaustiveness. return unless elements.all? &.type? element_types = elements.map &.type @@ -179,7 +179,7 @@ struct Crystal::ExhaustivenessChecker end end - # Retuens an array of all the types inside `type`: + # Returns an array of all the types inside `type`: # for unions it's all the union types, otherwise it's just that type. private def expand_types(type) if type.is_a?(UnionType) diff --git a/src/compiler/crystal/semantic/main_visitor.cr b/src/compiler/crystal/semantic/main_visitor.cr index c6b4ec4009c4..bf5ddb6bfb65 100644 --- a/src/compiler/crystal/semantic/main_visitor.cr +++ b/src/compiler/crystal/semantic/main_visitor.cr @@ -58,11 +58,11 @@ module Crystal property yield_vars : Array(Var)? # In vars we store the types of variables as we traverse the nodes. - # These type are not cummulative: if you do `x = 1`, 'x' will have + # These type are not cumulative: if you do `x = 1`, 'x' will have # type Int32. Then if you do `x = false`, 'x' will have type Bool. getter vars - # Here we store the cummulative types of variables as we traverse the nodes. + # Here we store the cumulative types of variables as we traverse the nodes. getter meta_vars : MetaVars property is_initialize : Bool property exception_handler_vars : MetaVars? = nil @@ -127,7 +127,7 @@ module Crystal # We initialize meta_vars from vars given in the constructor. # We store those meta vars either in the typed def or in the program - # so the codegen phase knows the cummulative types to do allocas. + # so the codegen phase knows the cumulative types to do allocas. unless meta_vars if typed_def = @typed_def meta_vars = typed_def.vars = MetaVars.new @@ -843,7 +843,7 @@ module Crystal def type_assign(target : InstanceVar, value, node) # Check if this is an instance variable initializer unless @scope - # `InstanceVar` assignment appered in block is not checked + # `InstanceVar` assignment appeared in block is not checked # by `Crystal::InstanceVarsInitializerVisitor` because this block # may be passed to a macro. So, it checks here. if current_type.is_a?(Program) || current_type.is_a?(FileModule) @@ -1288,7 +1288,7 @@ module Crystal if expand_macro(node) # It can happen that this call is inside an ArrayLiteral or HashLiteral, # was expanded but isn't bound to the expansion because the call (together - # with its expantion) was cloned. + # with its expansion) was cloned. if (expanded = node.expanded) && (!node.dependencies? || !node.type?) node.bind_to(expanded) end diff --git a/src/compiler/crystal/semantic/method_lookup.cr b/src/compiler/crystal/semantic/method_lookup.cr index 78569c9d1a9a..8b7ac5672f3a 100644 --- a/src/compiler/crystal/semantic/method_lookup.cr +++ b/src/compiler/crystal/semantic/method_lookup.cr @@ -305,7 +305,7 @@ module Crystal if a_def.double_splat match_arg_type = named_arg.type - # If there's a restrction on the double splat, check that it matches + # If there's a restriction on the double splat, check that it matches if double_splat_restriction if double_splat_entries double_splat_entries << named_arg diff --git a/src/compiler/crystal/semantic/top_level_visitor.cr b/src/compiler/crystal/semantic/top_level_visitor.cr index deb9c4c861d3..35a41277519a 100644 --- a/src/compiler/crystal/semantic/top_level_visitor.cr +++ b/src/compiler/crystal/semantic/top_level_visitor.cr @@ -1147,7 +1147,7 @@ class Crystal::TopLevelVisitor < Crystal::SemanticVisitor next_type = base_type.lookup_path_item(name, lookup_in_namespace: false, include_private: true, location: path.location) if next_type if next_type.is_a?(ASTNode) - path.raise "execpted #{name} to be a type" + path.raise "expected #{name} to be a type" end else base_type = check_type_is_type_container(base_type, path) diff --git a/src/compiler/crystal/semantic/type_declaration_processor.cr b/src/compiler/crystal/semantic/type_declaration_processor.cr index 52175e8652cd..97f636207065 100644 --- a/src/compiler/crystal/semantic/type_declaration_processor.cr +++ b/src/compiler/crystal/semantic/type_declaration_processor.cr @@ -105,7 +105,7 @@ struct Crystal::TypeDeclarationProcessor # they are initialized in at least one of the initialize methods. @non_nilable_instance_vars = {} of Type => Array(String) - # Nilable variables there were detected to not be initilized in an initialize, + # Nilable variables there were detected to not be initialized in an initialize, # but a superclass does initialize it. It's only an error if the explicit/guessed # type is not nilable itself. @nilable_instance_vars = {} of Type => Hash(String, InitializeInfo) diff --git a/src/compiler/crystal/tools/doc/method.cr b/src/compiler/crystal/tools/doc/method.cr index 629845c3e8a5..320f270799bd 100644 --- a/src/compiler/crystal/tools/doc/method.cr +++ b/src/compiler/crystal/tools/doc/method.cr @@ -38,7 +38,7 @@ class Crystal::Doc::Method end # Returns this method's docs ready to be shown (before formatting) - # in the UI. This includes copiying docs from previous def or + # in the UI. This includes copying docs from previous def or # ancestors and replacing `:inherit:` with the ancestor docs. # This docs not include the "Description copied from ..." banner # in case it's needed. diff --git a/src/compiler/crystal/tools/playground/agent_instrumentor_transformer.cr b/src/compiler/crystal/tools/playground/agent_instrumentor_transformer.cr index e009bf1a8804..54ffec6cb6d4 100644 --- a/src/compiler/crystal/tools/playground/agent_instrumentor_transformer.cr +++ b/src/compiler/crystal/tools/playground/agent_instrumentor_transformer.cr @@ -61,7 +61,7 @@ module Crystal # so the instrumentor can ignore call's of methods with this name # this will avoid instrumenting calls to methods with the same name than # declared macros in the playground source. For a more accurate solution - # a compilation should be done to distigush whether each call refers to a macro or + # a compilation should be done to distinguish whether each call refers to a macro or # a method. Between the macro names collection and only instrumenting def's inside # modules/classes the generated instrumentation is pretty good enough. See #2355 collector = MacroDefNameCollector.new diff --git a/src/crystal/dwarf/line_numbers.cr b/src/crystal/dwarf/line_numbers.cr index ff6c836072f3..6d303f3f88cd 100644 --- a/src/crystal/dwarf/line_numbers.cr +++ b/src/crystal/dwarf/line_numbers.cr @@ -159,7 +159,7 @@ module Crystal end end - # Matrix of decompressed `Row` to search line number informations from the + # Matrix of decompressed `Row` to search line number information from the # address of an instruction. # # The matrix contains indexed references to `directories` and `files` to diff --git a/src/docs_pseudo_methods.cr b/src/docs_pseudo_methods.cr index 6a9b44253d7b..5dcbec4ebde0 100644 --- a/src/docs_pseudo_methods.cr +++ b/src/docs_pseudo_methods.cr @@ -50,7 +50,7 @@ end # Returns the instance size of the given class as number of bytes. # -# *type* must be a constant or `typeof()` expresion. It cannot be evaluated at runtime. +# *type* must be a constant or `typeof()` expression. It cannot be evaluated at runtime. # # ``` # instance_sizeof(String) # => 16 diff --git a/src/exception/call_stack/mach_o.cr b/src/exception/call_stack/mach_o.cr index 883237dadf95..b858fe9da691 100644 --- a/src/exception/call_stack/mach_o.cr +++ b/src/exception/call_stack/mach_o.cr @@ -44,7 +44,7 @@ struct Exception::CallStack end end - # DWARF uses fixed addresses but Darwin loads exectutables at a random + # DWARF uses fixed addresses but Darwin loads executables at a random # address, so we must remove the load offset from the IP to match the # addresses in DWARF sections. # diff --git a/src/float/printer/grisu3.cr b/src/float/printer/grisu3.cr index 4b6bb151314f..79e0a1a67386 100644 --- a/src/float/printer/grisu3.cr +++ b/src/float/printer/grisu3.cr @@ -341,7 +341,7 @@ module Float::Printer::Grisu3 # the difference between w and boundary_minus/plus (a power of 2) and to # compute scaled_boundary_minus/plus by subtracting/adding from # scaled_w. However the code becomes much less readable and the speed - # enhancements are not terriffic. + # enhancements are not terrific. scaled_boundary_minus = boundaries[:minus] * ten_mk scaled_boundary_plus = boundaries[:plus] * ten_mk diff --git a/src/hash.cr b/src/hash.cr index c5577b8d4a33..af982de29d66 100644 --- a/src/hash.cr +++ b/src/hash.cr @@ -140,7 +140,7 @@ class Hash(K, V) # shift of the buffer (expensive). # # There might be other optimizations to try out, like not using Linear Probing, - # but for now this implementaton is much faster than the old one which used + # but for now this implementation is much faster than the old one which used # linked lists (closed addressing). # # All methods that deal with this implementation come after the constructors. diff --git a/src/http/server/response.cr b/src/http/server/response.cr index 5662656746de..86268cabd95b 100644 --- a/src/http/server/response.cr +++ b/src/http/server/response.cr @@ -96,7 +96,7 @@ class HTTP::Server raise "Can't read from HTTP::Server::Response" end - # Upgrades this response, writing headers and yieling the connection `IO` (a socket) to the given block. + # Upgrades this response, writing headers and yielding the connection `IO` (a socket) to the given block. # This is useful to implement protocol upgrades, such as websockets. def upgrade(&block : IO ->) write_headers diff --git a/src/humanize.cr b/src/humanize.cr index 794032bb5561..9f2d87640400 100644 --- a/src/humanize.cr +++ b/src/humanize.cr @@ -64,7 +64,7 @@ struct Number SI_PREFIXES = { {'y', 'z', 'a', 'f', 'p', 'n', 'ยต', 'm'}, {nil, 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'} } # SI prefixes used by `#humanize`. Equal to `SI_PREFIXES` but prepends the - # prefix with a space charater. + # prefix with a space character. SI_PREFIXES_PADDED = ->(magnitude : Int32, _number : Float64) do magnitude = Number.prefix_index(magnitude) {magnitude, (magnitude == 0 ? " " : si_prefix(magnitude))} diff --git a/src/json/from_json.cr b/src/json/from_json.cr index e0b1c66a62c3..a9903648c785 100644 --- a/src/json/from_json.cr +++ b/src/json/from_json.cr @@ -310,7 +310,7 @@ def Union.new(pull : JSON::PullParser) {% end %} end -# Reads a string from JSON parser as a time formated according to [RFC 3339](https://tools.ietf.org/html/rfc3339) +# Reads a string from JSON parser as a time formatted according to [RFC 3339](https://tools.ietf.org/html/rfc3339) # 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 diff --git a/src/json/to_json.cr b/src/json/to_json.cr index ebb80566f146..6f0228eb0382 100644 --- a/src/json/to_json.cr +++ b/src/json/to_json.cr @@ -166,7 +166,7 @@ struct Enum end struct Time - # Emits a string formated according to [RFC 3339](https://tools.ietf.org/html/rfc3339) + # Emits a string formatted according to [RFC 3339](https://tools.ietf.org/html/rfc3339) # ([ISO 8601](http://xml.coverpages.org/ISO-FDIS-8601.pdf) profile). # # The JSON format itself does not specify a time data type, this method just diff --git a/src/log/main.cr b/src/log/main.cr index 5a695cca2582..18b9aee1a12a 100644 --- a/src/log/main.cr +++ b/src/log/main.cr @@ -66,7 +66,7 @@ class Log # :ditto: def self.context=(value : Log::Context) # NOTE: There is a need for `Metadata` and `Context` setters in - # becuase `Log.context` returns a `Log::Context` for allowing DSL like `Log.context.set(a: 1)` + # because `Log.context` returns a `Log::Context` for allowing DSL like `Log.context.set(a: 1)` # but if the metadata is built manually the construct `Log.context = metadata` will be used. Log.context = value.metadata end diff --git a/src/openssl/ssl/context.cr b/src/openssl/ssl/context.cr index da4eb8d78bf1..5a867bc6267c 100644 --- a/src/openssl/ssl/context.cr +++ b/src/openssl/ssl/context.cr @@ -215,7 +215,7 @@ abstract class OpenSSL::SSL::Context LibSSL.ssl_ctx_free(@handle) end - # Sets the default paths for `ca_certiifcates=` and `ca_certificates_path=`. + # Sets the default paths for `ca_certificates=` and `ca_certificates_path=`. def set_default_verify_paths LibSSL.ssl_ctx_set_default_verify_paths(@handle) end diff --git a/src/option_parser.cr b/src/option_parser.cr index 2df3f00bd616..62fa89c19f65 100644 --- a/src/option_parser.cr +++ b/src/option_parser.cr @@ -221,7 +221,7 @@ class OptionParser end # Adds a separator, with an optional header message, that will be used to - # print the help. The seperator is placed between the flags registered (`#on`) + # print the help. The separator is placed between the flags registered (`#on`) # before, and the flags registered after the call. # # This way, you can group the different options in an easier to read way. diff --git a/src/slice.cr b/src/slice.cr index 0fae0e55155b..6ca401b85d77 100644 --- a/src/slice.cr +++ b/src/slice.cr @@ -357,7 +357,7 @@ struct Slice(T) # Copies the contents of this slice into *target*. # - # Raises `IndexError` if the desination slice cannot fit the data being transferred + # Raises `IndexError` if the destination slice cannot fit the data being transferred # e.g. dest.size < self.size. # # ``` @@ -376,7 +376,7 @@ struct Slice(T) # Copies the contents of *source* into this slice. # - # Raises `IndexError` if the desination slice cannot fit the data being transferred. + # Raises `IndexError` if the destination slice cannot fit the data being transferred. @[AlwaysInline] def copy_from(source : self) source.copy_to(self) @@ -396,7 +396,7 @@ struct Slice(T) # Moves the contents of this slice into *target*. *target* and `self` may # overlap; the copy is always done in a non-destructive manner. # - # Raises `IndexError` if the desination slice cannot fit the data being transferred + # Raises `IndexError` if the destination slice cannot fit the data being transferred # e.g. `dest.size < self.size`. # # ``` @@ -418,7 +418,7 @@ struct Slice(T) # Moves the contents of *source* into this slice. *source* and `self` may # overlap; the copy is always done in a non-destructive manner. # - # Raises `IndexError` if the desination slice cannot fit the data being transferred. + # Raises `IndexError` if the destination slice cannot fit the data being transferred. @[AlwaysInline] def move_from(source : self) source.move_to(self) diff --git a/src/socket/address.cr b/src/socket/address.cr index 2369de2cc809..6dba99637fee 100644 --- a/src/socket/address.cr +++ b/src/socket/address.cr @@ -67,7 +67,7 @@ class Socket # ``` # # `IPAddress` won't resolve domains, including `localhost`. If you must - # resolve an IP, or don't know whether a `String` constains an IP or a domain + # resolve an IP, or don't know whether a `String` contains an IP or a domain # name, you should use `Addrinfo.resolve` instead. struct IPAddress < Address UNSPECIFIED = "0.0.0.0" diff --git a/src/spec/expectations.cr b/src/spec/expectations.cr index 168facbfb42f..78ac5a47d53c 100644 --- a/src/spec/expectations.cr +++ b/src/spec/expectations.cr @@ -380,7 +380,7 @@ module Spec def expect_raises(klass : T.class, message : String | Regex | Nil = nil, file = __FILE__, line = __LINE__) forall T yield rescue ex : T - # We usually bubble Spec::AssertaionFailed, unless this is the expected exception + # We usually bubble Spec::AssertionFailed, unless this is the expected exception if ex.is_a?(Spec::AssertionFailed) && klass != Spec::AssertionFailed raise ex end diff --git a/src/time.cr b/src/time.cr index 0a7cebedde8b..02b2a8883747 100644 --- a/src/time.cr +++ b/src/time.cr @@ -189,7 +189,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. -# Its time-line has no specfied starting point but is strictly linearly +# Its time-line has no specified starting point but is strictly linearly # increasing. # # This monotonic clock should always be used for measuring elapsed time. @@ -584,7 +584,7 @@ struct Time # date `2007-04-31` which will be adjusted to `2007-04-30`. # # This operates on the local time-line, such that the local date-time - # represenations of month and year are increased by the specified amount. + # representations of month and year are increased by the specified amount. # # If the resulting date-time is ambiguous due to time zone transitions, # a correct time will be returned, but it does not guarantee which. @@ -602,7 +602,7 @@ struct Time # date `2007-04-31` which will be adjusted to `2007-04-30`. # # This operates on the local time-line, such that the local date-time - # represenations of month and year are decreased by the specified amount. + # representations of month and year are decreased by the specified amount. # # If the resulting date-time is ambiguous due to time zone transitions, # a correct time will be returned, but it does not guarantee which. diff --git a/src/yaml/builder.cr b/src/yaml/builder.cr index cc925fc5a107..03e5a86a46c7 100644 --- a/src/yaml/builder.cr +++ b/src/yaml/builder.cr @@ -26,7 +26,7 @@ class YAML::Builder @box : Void* - # By default the maximum nesting of sequences/amppings is 99. Nesting more + # By default the maximum nesting of sequences/mappings is 99. Nesting more # than this will result in a YAML::Error. Changing the value of this property # allows more/less nesting. property max_nesting = 99 diff --git a/src/yaml/serialization.cr b/src/yaml/serialization.cr index bd1b086d16d4..10b0ae2b8f1e 100644 --- a/src/yaml/serialization.cr +++ b/src/yaml/serialization.cr @@ -59,7 +59,7 @@ module YAML # ``` # # `YAML::Field` properties: - # * **ignore**: if `true` skip this field in seriazation and deserialization (by default false) + # * **ignore**: if `true` skip this field in serialization and deserialization (by default false) # * **key**: the value of the key in the yaml object (by default the name of the instance variable) # * **converter**: specify an alternate type for parsing and generation. The converter must define `from_yaml(YAML::ParseContext, YAML::Nodes::Node)` and `to_yaml(value, YAML::Nodes::Builder)` as class methods. Examples of converters are `Time::Format` and `Time::EpochConverter` for `Time`. # * **presence**: if `true`, a `@{{key}}_present` instance variable will be generated when the key was present (even if it has a `null` value), `false` by default