Permalink
Browse files

Reverting Array#first MRI compat.

git-svn-id: http://svn.codehaus.org/jruby/trunk/jruby@5921 961051c9-f516-0410-bf72-c9f7e237a7b7
  • Loading branch information...
1 parent d41564a commit b316fb1c92712a0ee8064c68a9c64d3abae048ae @lopex lopex committed Feb 12, 2008
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/org/jruby/RubyArray.java
  2. +1 −1 test/test_array_subclass_behavior.rb
@@ -1150,7 +1150,7 @@ public IRubyObject first(IRubyObject[] args) {
throw getRuntime().newArgumentError("negative array size (or size too big)");
}
- return makeShared(begin, (int) n, getMetaClass());
+ return makeShared(begin, (int) n, getRuntime().getArray());
}
/** rb_ary_last
@@ -26,7 +26,7 @@ def test_array_instance_methods_on_subclass
assert_equal(MyArray, (@arr*2).class)
assert_equal(MyArray, @arr.replace([1,2,3]).class)
assert_equal(Array, @arr.last(2).class)
- assert_equal(MyArray, @arr.first(2).class)
+ assert_equal(Array, @arr.first(2).class)
assert_equal(Array, @arr.collect.class)
assert_equal(Array, @arr.collect{true}.class)
assert_equal(Array, @arr.zip([1,2,3]).class)

0 comments on commit b316fb1

Please sign in to comment.