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: 620bd4c85cf3
Choose a base ref
...
head repository: opal/opal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 12cbb3868576
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Feb 27, 2015

  1. Fix issue #666

    Note that it says “…without escaping” in the spec:
    
    describe "String#match" do
      …
      it "converts string patterns to regexps without escaping" do
        'hello'.match('(.)\1')[0].should == 'll'
      end
    end
    vais committed Feb 27, 2015
    Copy the full SHA
    96b3255 View commit details
  2. Merge pull request #712 from vais/issue666

    Fix issue #666
    meh committed Feb 27, 2015
    Copy the full SHA
    12cbb38 View commit details
Showing with 1 addition and 1 deletion.
  1. +1 −1 opal/corelib/string.rb
2 changes: 1 addition & 1 deletion opal/corelib/string.rb
Original file line number Diff line number Diff line change
@@ -516,7 +516,7 @@ def lstrip

def match(pattern, pos = undefined, &block)
if String === pattern || pattern.respond_to?(:to_str)
pattern = /#{Regexp.escape(pattern.to_str)}/
pattern = Regexp.new(pattern.to_str)
end

unless Regexp === pattern