We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
headius
Learn more about funding links in repositories.
Report abuse
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$ jruby -v jruby 9.1.12.0 (2.3.3) 2017-06-15 33c6439 Java HotSpot(TM) 64-Bit Server VM 25.131-b11 on 1.8.0_131-b11 +jit [darwin-x86_64]
$ ruby -v ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
$ uname -a Darwin mbf.local 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
$stdin.set_encoding(Encoding::UTF_8) should return itself, just like in MRI:
$stdin.set_encoding(Encoding::UTF_8)
$ irb >> $stdin.set_encoding(Encoding::UTF_8) => #<IO:<STDIN>>
$stdin.set_encoding(Encoding::UTF_8) returns nil (as we can see here).
nil
This one-liner shows the issue:
puts $stdin.set_encoding(Encoding::UTF_8) ? "ok" : "not ok"
$ ruby set_encoding.rb ok $ jruby set_encoding.rb not ok
Is there a reasoning behind this, or is this a bug?
The text was updated successfully, but these errors were encountered:
4d1db6f
Merge pull request #4713 from MSNexploder/set_encoding
9f46ea7
IO#set_encoding should return self (fixes #4712)
No branches or pull requests
Environment
Expected Behavior
$stdin.set_encoding(Encoding::UTF_8)
should return itself, just like in MRI:Actual Behavior
$stdin.set_encoding(Encoding::UTF_8)
returnsnil
(as we can see here).This one-liner shows the issue:
Is there a reasoning behind this, or is this a bug?
The text was updated successfully, but these errors were encountered: