Use self.begin/self.end instead of first/last to compute hash for
ranges. The first/last methods raise RangeError for endless/beginless
ranges, but the internal begin/end accessors return nil safely.
Co-authored-by: Claude <noreply@anthropic.com>
added parentheses to all `to_enum` and `super` calls where the return
value is used (returned, assigned, or passed to another method). this
makes the code style consistent with the guideline that method calls
should use parentheses when their return values are consumed.
changes:
- return to_enum :symbol -> return to_enum(:symbol)
- return to_enum :symbol, arg -> return to_enum(:symbol, arg)
- super message, name -> super(message, name)
affected files: 10error.rb, array.rb, enum.rb, hash.rb, kernel.rb,
numeric.rb, range.rb
Co-authored-by: Claude <noreply@anthropic.com>
Replace XML-style markup tags in comments with markdown equivalents:
- <code>...</code> to `...` (inline code)
- <tt>...</tt> to `...` (teletype/monospace)
- <i>...</i> to *...* (italics/emphasis)
- +...+ to `...` (parameter/variable references)
Updated 80+ files across core source, headers, mrbgems, and libraries
to use consistent markdown formatting in documentation comments.
Handled edge cases including special characters like <=> operators.
Co-authored-by: Atlassian Rovo Dev
* The `Fixnum` constant is now an alias for the `Integer` class.
* Remove `struct mrb_state::fixnum_class` member.
If necessary, use `struct mrb_state::integer_class` instead.