Skip to content

Commit c9f3107

Browse files
committedOct 30, 2013
Javascript does not support all ruby regexp anchors
1 parent 2a91f3b commit c9f3107

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

Diff for: ‎README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ code.
5858

5959
* **line 547**: opal cannot use mutable strings (see opal/rspec/fixes.rb)
6060

61-
* **line 564**: opal cannot use mutable strings (see opal/rspec/fixes.rb)
61+
* **line 564**: opal cannot use mutable strings (see opal/rspec/fixes.rb). Also, opal
62+
does not support 2 regexp special characters yet (`\A` and `\z`).
6263

6364
### rspec/core/project_initializer.rb
6465

Diff for: ‎opal/opal/rspec/fixes.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def self.base_name_for(group)
4343

4444
# Ruby requires first const letter to be A-Z. Use `Nested`
4545
# as necessary to enforce that.
46-
name = name.gsub(/\A([^A-Z]|\z)/, 'Nested$1')
46+
name = name.gsub(/^([^A-Z]|$)/, 'Nested$1')
4747

4848
name
4949
end

0 commit comments

Comments
 (0)