Skip to content

Commit 3acc377

Browse files
authored
various: fix miscellaneous typos (#584)
Signed-off-by: Patrick Linnane <[email protected]>
1 parent 0ab2083 commit 3acc377

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

docs/machostructure-dsl.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
## Documentation
33
The MachOStructure class makes it easy to describe binary chunks by using the #field method. This method generates the byte size and format strings necessary to parse a chunk of binary data. It also automatically generates the constructor and readers for all fields as well.
44

5-
The fields are created in order so you will be expected to pass those arguements to the constructor in the same order. Fields with no arguments should be defined last and fields with default arguments should be defined right before them.
5+
The fields are created in order so you will be expected to pass those arguments to the constructor in the same order. Fields with no arguments should be defined last and fields with default arguments should be defined right before them.
66

77
The type and options of inherited fields can be changed but their argument position and the number of arguments (used to calculate min_args) will also not change.
88

9-
Usually, endianness is handled by the Utils#specialize_format method but occasionally a field needs to specifiy that beforehand. That is what the :endian option is for. If not specified, a placeholder is used so that can be specified later.
9+
Usually, endianness is handled by the Utils#specialize_format method but occasionally a field needs to specify that beforehand. That is what the :endian option is for. If not specified, a placeholder is used so that can be specified later.
1010

1111
## Syntax
1212
```ruby
@@ -36,13 +36,13 @@ end
3636
- an unsigned 32 bit integer
3737
- `:uint64 `
3838
- an unsigned 64 bit integer
39-
- `:view` [initalized]
39+
- `:view` [initialized]
4040
- an instance of the MachOView class (lib/macho/view.rb)
41-
- `:lcstr` [NOT initalized]
41+
- `:lcstr` [NOT initialized]
4242
- an instance of the LCStr class (lib/macho/load_commands.rb)
43-
- `:two_level_hints_table` [NOT initalized] [NO argument]
43+
- `:two_level_hints_table` [NOT initialized] [NO argument]
4444
- an instance of the TwoLevelHintsTable class (lib/macho/load_commands.rb)
45-
- `:tool_entries` [NOT initalized]
45+
- `:tool_entries` [NOT initialized]
4646
- an instance of the ToolEntries class (lib/macho/load_commands.rb)
4747

4848
## Option Types
@@ -58,5 +58,5 @@ end
5858
- `:size` [Integer] size in bytes
5959
- `:padding` [Symbol] optionally specify `:null` padding
6060

61-
## More Infomation
61+
## More Information
6262
Hop over to lib/macho/structure.rb to see the class itself.

lib/macho/structure.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def inherited(subclass) # rubocop:disable Lint/MissingSuper
131131

132132
# @param name [Symbol] name of internal field
133133
# @param type [Symbol] type of field in terms of binary size
134-
# @param options [Hash] set of additonal options
134+
# @param options [Hash] set of additional options
135135
# Expected options
136136
# :size [Integer] size in bytes
137137
# :mask [Integer] bitmask
@@ -236,7 +236,7 @@ def def_mask_reader(name, idx, mask)
236236
# Generates a reader method for fields that need further unpacking.
237237
# @param name [Symbol] name of internal field
238238
# @param idx [Integer] the index of the field value in the @values array
239-
# @param unpack [String] the format code used for futher binary unpacking
239+
# @param unpack [String] the format code used for further binary unpacking
240240
# @api private
241241
def def_unpack_reader(name, idx, unpack)
242242
define_method(name) do

0 commit comments

Comments
 (0)