Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opal/opal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0393ad0d6679
Choose a base ref
...
head repository: opal/opal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 058248dffef0
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Nov 27, 2013

  1. Copy the full SHA
    0a072c3 View commit details
  2. Copy the full SHA
    058248d View commit details
Showing with 2 additions and 5 deletions.
  1. +2 −0 opal/corelib/array.rb
  2. +0 −5 spec/opal/filters/bugs/array.rb
2 changes: 2 additions & 0 deletions opal/corelib/array.rb
Original file line number Diff line number Diff line change
@@ -851,6 +851,8 @@ def first(count = undefined)
%x{
if (count != null) {
count = #{Opal.coerce_to `count`, Integer, :to_int};
if (count < 0) {
#{raise ArgumentError};
}
5 changes: 0 additions & 5 deletions spec/opal/filters/bugs/array.rb
Original file line number Diff line number Diff line change
@@ -28,8 +28,6 @@
fails "Array#delete may be given a block that is executed if no element matches object"
fails "Array#delete returns the last element in the array for which object is equal under #=="

fails "Array#dup creates a new array containing all elements or the original"

fails "Array.[] can unpack 2 or more nested referenced array"

fails "Array#[]= sets elements in the range arguments when passed ranges"
@@ -44,9 +42,6 @@
fails "Array#fetch tries to convert the passed argument to an Integer using #to_int"
fails "Array#fetch raises a TypeError when the passed argument can't be coerced to Integer"

fails "Array#first tries to convert the passed argument to an Integer using #to_int"
fails "Array#first raises a TypeError if the passed argument is not numeric"

fails "Array#flatten does not call flatten on elements"
fails "Array#flatten raises an ArgumentError on recursive arrays"
fails "Array#flatten with a non-Array object in the Array ignores the return value of #to_ary if it is nil"