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

Commits on Mar 29, 2015

  1. Copy the full SHA
    63e0d6e View commit details
  2. Merge pull request #780 from vais/matchdata

    Fix incorrect MatchData#pre_match and #post_match behavior
    elia committed Mar 29, 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
    6f68a48 View commit details
Showing with 2 additions and 2 deletions.
  1. +2 −2 opal/corelib/match_data.rb
4 changes: 2 additions & 2 deletions opal/corelib/match_data.rb
Original file line number Diff line number Diff line change
@@ -6,8 +6,8 @@ def initialize(regexp, match_groups)
@regexp = regexp
@begin = `match_groups.index`
@string = `match_groups.input`
@pre_match = `#@string.substr(0, regexp.lastIndex - match_groups[0].length)`
@post_match = `#@string.substr(regexp.lastIndex)`
@pre_match = `match_groups.input.slice(0, match_groups.index)`
@post_match = `match_groups.input.slice(match_groups.index + match_groups[0].length)`
@matches = []

%x{