@@ -301,7 +301,7 @@ This `ID` is a number having a one-to-one association with a string. However,
301301it's not possible to have an association between all strings in this world and
302302numerical values. It is limited to the one to one relationships
303303inside one `ruby` process. I'll speak of the method to find an `ID` in the
304- next chapter "Names and name tables".
304+ next chapter "Names and name tables."
305305
306306In language processor, there are a lot of names to handle. Method names
307307or variable names, constant names, file names, class names... It's
@@ -388,7 +388,7 @@ For `Qnil`, there is a macro dedicated to check if a `VALUE` is `Qnil` or not,
388388
389389The name ending with `p` is a notation coming from Lisp denoting that it is a
390390function returning a boolean value. In other words, `NIL_P` means "is the
391- argument `nil`?". It seems the "`p`" character comes from "predicate." This
391+ argument `nil`?" It seems the "`p`" character comes from "predicate." This
392392naming rule is used at many different places in `ruby`.
393393
394394Also, in Ruby, `false` and `nil` are false (in conditional statements)
@@ -476,7 +476,7 @@ module, `Object` just includes it. As modules are functionally similar to
476476multiple inheritance, it may seem having just `super` is problematic, but
477477in `ruby` some clever conversions are made to make it look like single
478478inheritance. The details of this process will be explained in the fourth
479- chapter "Classes and modules".
479+ chapter "Classes and modules."
480480
481481Because of this conversion, `super` of the struct of `Object` points to `struct RClass`
482482which is the entity of `Kernel` object and the `super` of Kernel is `NULL`.
@@ -533,7 +533,7 @@ puts the found value at the address given in third parameter (`&body`).
533533Nevertheless, doing this search each time whatever the circumstances would be
534534too slow. That's why in reality, once called, a method is cached. So starting
535535from the second time it will be found without following `super` one by one.
536- This cache and its search will be seen in the 15th chapter "Methods".
536+ This cache and its search will be seen in the 15th chapter "Methods."
537537
538538h2. Instance variables
539539
@@ -731,7 +731,7 @@ Let's see this in practice.
731731`rb_special_const_p()` is true when its parameter is not a pointer. However,
732732as this `if` part requires knowledge of the garbage collector, we'll skip it
733733for now. I'd like you to check it again after reading the chapter 5 "Garbage
734- collection".
734+ collection."
735735
736736`st_init_numtable()` already appeared some time ago. It creates a new hash
737737table.
@@ -740,7 +740,7 @@ table.
740740searches for what's attached to `obj`. If an attached value can be found, the
741741whole function returns true and stores the value at the address (`&tbl`) given
742742as third parameter. In short, `!st_lookup(...)` can be read "if a value can't
743- be found".
743+ be found."
744744
745745`st_insert()` was also already explained. It stores a new association in a
746746table.
@@ -798,7 +798,7 @@ Furthermore, if the size of `RString` was as much as 4 pointers,
798798`Robject` would use less than the half size of the union,
799799and this is too wasteful.
800800
801- So the received merit for `iv_tbl` is more or less saving memory and speeding
801+ So the benefit of `iv_tbl` is more or less saving memory and speeding
802802up. Furthermore we do not know if it is used often or not. In fact,
803803`generic_iv_tbl` was not introduced before `ruby` 1.2, so it was not possible
804804to use instance variables in `String` or `Array` at that time. Nevertheless, it
@@ -852,7 +852,7 @@ The structure is completely the same.
852852(A) For `struct RObject` or `RClass`, we search the variable in `iv_tbl`. As
853853`iv_tbl` can also be `NULL`, we must check it before using it. Then if
854854`st_lookup()` finds the relation, it returns true, so the whole `if` can be
855- read as "If the instance variable has been set, return its value".
855+ read as "If the instance variable has been set, return its value."
856856
857857(C) If no correspondence could be found, in other words if we read an
858858instance variable that has not been set, we first leave the `if` then the
@@ -1096,7 +1096,7 @@ which is Ruby's hash table.
10961096</pre>
10971097
10981098It's a wrapper for `struct st_table`. `st_table` will be detailed in the next
1099- chapter "Names and name tables".
1099+ chapter "Names and name tables."
11001100
11011101`ifnone` is the value when a key does not have an associated value, its default
11021102is `nil`. `iter_lev` is to make the hashtable reentrant (multithread safe).
@@ -1168,6 +1168,6 @@ for managing a pointer to a user defined struct" has been created on
11681168Because explaining `struct RData` is still too complicated, for
11691169the time being let's just look at its representation (figure 8).
11701170The detailed explanation of its members will be introduced
1171- after we'll finish chapter 5 "Garbage collection".
1171+ after we'll finish chapter 5 "Garbage collection."
11721172
11731173!images/ch_object_rdata.png(Representation of `struct RData`)!
0 commit comments