Comments (2)
The root cause seems to be confusing m
flag of Ruby and JavaScript.
Actually m
flag of Ruby only changes the semantics of .
and does not change ^
or $
.
Equivalent flag in JavaScript is s
.
from opal.
Yes @takaram, I was also mistaken about this in the first version of the post. Later I edited it to clarify. But I wasn't aware of the JS s
flag. #2610 fixes this issue by transpiling the regexps (but still needs some work due to performance impact). As of now, .
is transpiled to [\s\S]
if m
flag is present. I foresee an issue with things like Regexp.union
if we chose to depend on the flags.
from opal.
Related Issues (20)
- Bug: Cannot rescue regexp syntax error
- don't use javascript block.length to determine number of arguments in block definition
- Bug: Minus signs of number literals missing (e.g. -1 => 1) if comment contains umlaut (e.g. "ΓΌ") HOT 5
- Bug: No backtrace on exceptions under Firefox HOT 6
- Feature: Opalfile
- Bug: Methods defined by `Module#define_method` with UnboundMethod do not accept a block
- Bug: jsid_cache breaks for `"toString"`, and I suspect other methods of JS Object HOT 6
- is it possible to require 'openssl' in opalrb? HOT 1
- is it possible to require 'openssl' in opalrb? HOT 1
- Bug: `def` + `define_method` + `return` cause `LocalJumpError` HOT 1
- Feature: mirror Opal only classes into CRuby
- Bug: define_method -> block -> return -- unexpected return
- Bug: String#strip differs in handling the NBSP character
- 1.8.2 release was not completed HOT 2
- Bug: `Hash#compare_by_identity` does not work with string keys
- Bug: String interpolation with bridged classes does not call `to_s` HOT 2
- Bug: Cannot run minitest on Ruby 3.3 HOT 1
- Feature: Date and DateTime classes from Ruby HOT 5
- Bug: `load` cannot be invoked on a path unless `require` has been called on it first
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opal.