We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
doctree/refm/api/src/stringio.rd
Line 34 in 8fe7856
--- open(string = '', mode = 'r+') {|io| ... } -> StringIO
動作を見る限りでは、StringIO#openにブロックを渡した場合は、StringIO(のインスタンス)ではなくブロックを評価した結果が返ってきているように思います。
% ruby -v ruby 2.2.0p0 (2014-12-25 revision 49005) [x64-mswin64_100] % irb irb(main):001:0> require "stringio" => true irb(main):002:0> StringIO.open { |f| f.write "hello" } => 5 irb(main):003:0> StringIO.open { |f| f.write "hello"; 123 } => 123 irb(main):004:0> StringIO.open { |f| f.write "hello"; f } => #<StringIO:0x000000020db428> irb(main):005:0>
The text was updated successfully, but these errors were encountered:
Fix StringIO.open return value. (refs gh-157)
9f8cc72
ありがとうございます。1.8.7まで遡りましたが以下と同じでした。ご指摘の通りでしたので修正しました。
Sorry, something went wrong.
No branches or pull requests
doctree/refm/api/src/stringio.rd
Line 34 in 8fe7856
動作を見る限りでは、StringIO#openにブロックを渡した場合は、StringIO(のインスタンス)ではなくブロックを評価した結果が返ってきているように思います。
The text was updated successfully, but these errors were encountered: