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: ee1deb596beb
Choose a base ref
...
head repository: opal/opal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4699afb4fc94
Choose a head ref
  • 5 commits
  • 4 files changed
  • 2 contributors

Commits on May 2, 2015

  1. Copy the full SHA
    173391d View commit details
  2. Copy the full SHA
    322a3c2 View commit details
  3. Copy the full SHA
    f3b7328 View commit details
  4. Bump issue #710

    vais committed May 2, 2015

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    3b160db View commit details
  5. Merge pull request #827 from vais/bugs-string-cleanup

    Clean up filters/bugs/string a little
    elia committed May 2, 2015
    Copy the full SHA
    4699afb View commit details
Showing with 5 additions and 20 deletions.
  1. +1 −1 opal/corelib/string.rb
  2. +1 −1 spec/corelib
  3. +2 −18 spec/filters/bugs/string.rb
  4. +1 −0 spec/rubyspecs
2 changes: 1 addition & 1 deletion opal/corelib/string.rb
Original file line number Diff line number Diff line change
@@ -386,7 +386,7 @@ def each_line(separator = $/)
return self;
}
var chomped = #{chomp},
var chomped = #{chomp(separator)},
trailing = self.length != chomped.length,
splitted = chomped.split(separator);
2 changes: 1 addition & 1 deletion spec/corelib
20 changes: 2 additions & 18 deletions spec/filters/bugs/string.rb
Original file line number Diff line number Diff line change
@@ -1,28 +1,19 @@
opal_filter "String" do
#The following two failures are waiting for https://github.com/opal/opal/issues/710 to be fixed
fails "String#[] with Range calls to_int on range arguments"
fails "String#slice with Range calls to_int on range arguments"

fails "String#clone copies singleton methods"
fails "String#clone copies modules included in the singleton class"
fails "String#clone does not modify the original string when changing cloned string"

fails "String#dup does not copy constants defined in the singleton class"

fails "String#each_line uses $/ as the separator when none is given"
fails "String#each_line yields subclass instances for subclasses"

fails "String#lines uses $/ as the separator when none is given"
fails "String#lines yields subclass instances for subclasses"

#The following failure is a side-effect of a symbol being used in one of the assertions:
fails "String#scan raises a TypeError if pattern isn't a Regexp and can't be converted to a String"

#The following failure is a side-effect of the currently broken MatchData#offset implementation:
fails "String#scan with pattern and block sets $~ for access from the block"

fails "String#slice with Range calls to_int on range arguments"

fails "String#split with String returns subclass instances based on self"
fails "String#split with Regexp respects $KCODE when splitting between characters"
fails "String#split with Regexp includes all captures in the result array"
fails "String#split with Regexp does not include non-matching captures in the result array"
fails "String#split with Regexp returns subclass instances based on self"
@@ -119,13 +110,6 @@
fails "String#to_r understands a forward slash as separating the numerator from the denominator"
fails "String#to_r returns (0/1) for Strings it can't parse"

fails "String#crypt returns a cryptographic hash of self by applying the UNIX crypt algorithm with the specified salt"
fails "String#crypt raises an ArgumentError when the salt is shorter than two characters"
fails "String#crypt calls #to_str to converts the salt arg to a String"
fails "String#crypt raises a type error when the salt arg can't be converted to a string"
fails "String#crypt taints the result if either salt or self is tainted"
fails "String#crypt doesn't return subclass instances"

fails "String#dump taints the result if self is tainted"
fails "String#dump untrusts the result if self is untrusted"
fails "String#dump returns a subclass instance"
1 change: 1 addition & 0 deletions spec/rubyspecs
Original file line number Diff line number Diff line change
@@ -80,6 +80,7 @@ corelib/core/range/new_spec
corelib/core/range/size_spec

corelib/core/string
!corelib/core/string/crypt_spec
!corelib/core/string/scrub_spec

corelib/core/symbol/to_proc_spec