File/IO readlines supporting new params limit, and open mode#650
File/IO readlines supporting new params limit, and open mode#650enebo merged 2 commits intojruby:masterfrom
Conversation
|
@josedonizetti This patch looks good but there is one problem with it. The @JRubyMethod annotations for both of those method bindings will work in both 1.8 and 1.9 mode. The new argument support you are adding should only work for 1.9 mode. Could you refactor this to support both modes (You can see an example of this splitting in RubyIO.sysopen()/RubyIO.sysopen19())? Mostly this just means having 4 Java methods 2 for 1.8 and 2 for 1.9 with usually a common method which can perform the work. Be aware due to backwards compat that the original Java method names for these need to keep their names and the same method signature. The 1.9 versions can be labelled readlines19(). |
|
@enebo With this last commit, the support is exclusive for 1.9 not affecting 1.8 at all. Also I've fixed all the specs related to IO.readlines but two. One because of enconding, when reading the files at the time of comparing the characters are all corrupted and the other because JRuby don't yet support IO.popen("-") we get this error on the 1.8 as well. Let me know if anything. Thanks! |
File/IO readlines supporting new params limit, and open mode (thanks jose!)
It fixes 12 failures, and 9 errors of the rubyspec test core/io/readlines_spec.rb
Let me know if I need to change anything.