-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ruby regexp warning: character class has duplicated range #439
Comments
I’ll take a look at it. That code goes back to early versions of Ruby 2, if not earlier. |
There is no explicit code that uses the regular expression sequence
But, I can't reproduce this on either Ruby 3.2.0 or 2.6.10. Also, your minimal example Can you provide some more details of your environment? Ruby version? If you download the gem, and do a I develop on Mac OS, but many other platforms are run in GH Actions. |
Some environments have warnings enabled and others don't. If you run #!/bin/env -S ruby -w
require "rdf"
RDF::URI.new("http://example.com") That produces the following output on my machine:
Same on Ruby 2.6.10 and ruby 3.0.3. |
Should be fixed on the Setting |
Yes, great. The repeated output in my specs is gone. I still have a few messages during boot though:
|
I’m not seeing this in the action run associated with this PR, or on my matchine. Can you give me something to reproduce it? |
In your rdf project directory: echo '#!/bin/env -S ruby -w
require "rdf"
RDF::URI.new("http://example.com")
' > test.rb
ruby -Ilib test.rb |
Apparently, the IRI Normalization makes use of a hidden feature in Ruby Regular expressions, where |
Okay, try it now. |
Excellent! Solved. Thank you for such a quick response. 🙇 |
Thank you for your work here. Great job. There's just one little thing that's slowing be down at the moment:
Calling
RDF::URI#canonicalize
triggers a Ruby warning:I could reduce it to this code which still triggers the warning:
I get these messages a lot when running tests, for example. Difficult to see the right output.
The text was updated successfully, but these errors were encountered: