Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/org/jruby/java/proxies/ArrayJavaProxy.java b/src/org/jruby/java/proxies/ArrayJavaProxy.java
- index c0bea32..a2ba494 100644
- --- a/src/org/jruby/java/proxies/ArrayJavaProxy.java
- +++ b/src/org/jruby/java/proxies/ArrayJavaProxy.java
- @@ -133,6 +133,11 @@ public class ArrayJavaProxy extends JavaProxy {
- RubyModule javaArrayUtilities = context.getRuntime().getJavaSupport().getJavaArrayUtilitiesModule();
- return RuntimeHelpers.invoke(context, javaArrayUtilities, "java_to_ruby", this);
- }
- +
- + @JRubyMethod
- + public IRubyObject to_s(ThreadContext context) {
- + return getJavaArray().to_s();
- + }
- public IRubyObject getRange(ThreadContext context, IRubyObject[] args) {
- if (args.length == 1) {
- diff --git a/test/test_io.rb b/test/test_io.rb
- index 4ab183d..77a2129 100644
- --- a/test/test_io.rb
- +++ b/test/test_io.rb
- @@ -484,11 +484,11 @@ class TestIO < Test::Unit::TestCase
- unless WINDOWS
- def test_sh_used_appropriately
- # should not use sh
- - p, o, i, e = IO.popen4("/bin/ps -a -f")
- - assert_match p.to_s, i.read.lines.grep(/\/bin\/ps/).first
- + p, o, i, e = IO.popen4("/bin/ps -a -x -f")
- + assert_match p.to_s, i.read.lines.grep(/\/bin\/ps -a -x -f/).first
- # should use sh
- - p, o, i, e = IO.popen4("/bin/ps -a -f | grep ps'")
- + p, o, i, e = IO.popen4("/bin/ps -a -x -f | grep [/]bin/ps'")
- assert_no_match Regexp.new(p.to_s), i.read.grep(/\/bin\/ps/).first
- end
- end
Add Comment
Please, Sign In to add comment