Commit Graph

4 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto b11596891a mruby-encoding: add missing call-seq documentation for string methods
Added comprehensive call-seq documentation for the 2 missing public
methods in the encoding gem, improving documentation coverage from
33% to 100%.

Documentation added:
- String#encoding: Returns the encoding of a string (UTF-8 or ASCII-8BIT)
- String#force_encoding: Changes string encoding in place

Each method now includes:
- Clear method signatures with parameter and return types
- Descriptions of encoding behavior specific to mruby's limitations
- Practical examples showing usage patterns
- Notes about mruby's simplified encoding support (UTF-8, ASCII-8BIT, BINARY)

This complements the existing String#valid_encoding? documentation and
provides complete coverage for mruby's "poorman's encoding" functionality,
making it easier for developers to understand encoding operations in
embedded Ruby environments.

Co-authored-by: Atlassian Rovo Dev
2025-07-15 11:54:12 +09:00
Yukihiro "Matz" Matsumoto 5cdd394c6d mruby-encoding: add README.md
The document is written by Google Jules.
2025-06-09 17:11:46 +09:00
Yukihiro "Matz" Matsumoto 6174541d82 mruby-encoding: move String#b to mruby-string-ext gem 2025-01-18 13:23:55 +09:00
Yukihiro "Matz" Matsumoto 74bdae9e4c mruby-encoding: add Poorman's Encoding gem
The difference from CRuby's Encoding:

- Encoding is a module, instead of a class
- each Encoding (e.g. `Encoding::UTF_8) is a string instead of Encoding object
- only supports  `UTF-8` and `ASCII-8BIT` (and its alias `BINARY`)

Using this gem automatically turn on `MRB_UTF8_STRING` support.
2025-01-16 08:52:41 +09:00