regexp-match-polyfill 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/regexp-match-polyfill/version.rb +1 -1
- data/lib/regexp-match-polyfill.rb +5 -1
- data/regexp-match-polyfill.gemspec +2 -2
- data/test/test-regexp-match-polyfill.rb +5 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7da60e6e01fc354c5d5c74ad72a2f28d6220d76
|
4
|
+
data.tar.gz: e77e5fd3f610b1ca705c92048c29c3982dcde6b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9f20128834c0bb1da924515122a453bf638c822e302068dccb05948a525784ecdd85a6a350bd6d29ae5892bed968a5a73604cfa100c52928ea10a6fc87bc187
|
7
|
+
data.tar.gz: e140fda9bfd546c794d819cf29694db823725e8388cbf45e559516ab4e2ce1e42b8f5d9342c056b5b97503d31a8c5ff1601b31508944827d4379cebfed7ce7f8
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
## Implements Regexp#match? and
|
1
|
+
## Implements Regexp#match?, String#match? and Symbol#match? in Ruby < 2.4.
|
2
2
|
|
3
3
|
[](https://badge.fury.io/rb/regexp-match-polyfill)
|
4
4
|
[](https://travis-ci.org/yivo/regexp-match-polyfill)
|
@@ -1,7 +1,10 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
unless Regexp.instance_methods.include?(:match?) &&
|
4
|
+
unless Regexp.instance_methods.include?(:match?) &&
|
5
|
+
String.instance_methods.include?(:match?) &&
|
6
|
+
Symbol.instance_methods.include?(:match?)
|
7
|
+
|
5
8
|
module RegexpMatchPolyfill
|
6
9
|
module RegexpExtension
|
7
10
|
def match?(string, position = 0)
|
@@ -18,4 +21,5 @@ unless Regexp.instance_methods.include?(:match?) && String.instance_methods.incl
|
|
18
21
|
|
19
22
|
Regexp.include RegexpMatchPolyfill::RegexpExtension
|
20
23
|
String.include RegexpMatchPolyfill::StringExtension
|
24
|
+
Symbol.include RegexpMatchPolyfill::StringExtension
|
21
25
|
end
|
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.version = RegexpMatchPolyfill::VERSION
|
9
9
|
s.author = 'Yaroslav Konoplov'
|
10
10
|
s.email = 'eahome00@gmail.com'
|
11
|
-
s.summary = 'Implements Regexp#match? and
|
12
|
-
s.description = 'Implements Regexp#match? and
|
11
|
+
s.summary = 'Implements Regexp#match?, String#match? and Symbol#match? in Ruby < 2.4.'
|
12
|
+
s.description = 'Implements Regexp#match?, String#match? and Symbol#match? in Ruby < 2.4.'
|
13
13
|
s.homepage = 'https://github.com/yivo/regexp-match-polyfill'
|
14
14
|
s.license = 'MIT'
|
15
15
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: regexp-match-polyfill
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yaroslav Konoplov
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.2'
|
55
|
-
description: Implements Regexp#match? and
|
55
|
+
description: Implements Regexp#match?, String#match? and Symbol#match? in Ruby < 2.4.
|
56
56
|
email: eahome00@gmail.com
|
57
57
|
executables: []
|
58
58
|
extensions: []
|
@@ -88,9 +88,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
90
|
rubyforge_project:
|
91
|
-
rubygems_version: 2.
|
91
|
+
rubygems_version: 2.5.2
|
92
92
|
signing_key:
|
93
93
|
specification_version: 4
|
94
|
-
summary: Implements Regexp#match? and
|
94
|
+
summary: Implements Regexp#match?, String#match? and Symbol#match? in Ruby < 2.4.
|
95
95
|
test_files:
|
96
96
|
- test/test-regexp-match-polyfill.rb
|