diff options
author | Burdette Lamar <[email protected]> | 2022-02-25 13:12:59 -0600 |
---|---|---|
committer | GitHub <[email protected]> | 2022-02-25 13:12:59 -0600 |
commit | 26ffda2fd217651e73eb71e6da8f89eb17866f9d (patch) | |
tree | 6f41f5b0ce7c206fb9a249d8f739df48330053d3 /io.c | |
parent | 189ac52bba8b1355186431acfa335d40991a7406 (diff) |
[DOC] Enhanced RDoc for some encoding methods (#5598)
In String, treats:
#b
#scrub
#scrub!
#unicode_normalize
#unicode_normalize!
#encode
#encode!
Also adds a note to IO.new (suggested by @jeremyevans).
Notes
Notes:
Merged-By: BurdetteLamar <[email protected]>
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -8943,6 +8943,13 @@ rb_io_make_open_file(VALUE obj) * fd = IO.sysopen(path) # => 3 * IO.new(fd) # => #<IO:fd 3> * + * The new \IO object does not inherit encoding + * (because the integer file descriptor does not have an encoding): + * + * fd = IO.sysopen('t.rus', 'rb') + * io = IO.new(fd) + * io.external_encoding # => #<Encoding:UTF-8> # Not ASCII-8BIT. + * * Optional argument +mode+ (defaults to 'r') must specify a valid mode * see IO@Modes: * |