Skip to content
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

Recent changes for v0.1.0.2 do not pass RubySpec #34

Closed
headius opened this issue Nov 23, 2022 · 8 comments
Closed

Recent changes for v0.1.0.2 do not pass RubySpec #34

headius opened this issue Nov 23, 2022 · 8 comments

Comments

@headius
Copy link

headius commented Nov 23, 2022

The changes in v0.1.0.2 do not appear to pass RubySpec. Either the library needs to be fixed or the specs need to be updated.

See https://github.com/jruby/jruby/actions/runs/3535817028/jobs/5934245109 for an example job that failed on JRuby after updating to v0.1.0.2.

@headius
Copy link
Author

headius commented Nov 23, 2022

Failing specs for convenience:

1)
CGI::Cookie#name returns self's name ERROR
ArgumentError: invalid name: "another cookie"
/home/runner/work/jruby/jruby/lib/ruby/stdlib/cgi/cookie.rb:108:in `name='
/home/runner/work/jruby/jruby/lib/ruby/stdlib/cgi/cookie.rb:91:in `initialize'
org/jruby/RubyClass.java:890:in `new'
/home/runner/work/jruby/jruby/spec/ruby/library/cgi/cookie/name_spec.rb:9:in `block in <main>'
org/jruby/RubyBasicObject.java:2677:in `instance_exec'
org/jruby/RubyArray.java:4686:in `all?'
org/jruby/RubyArray.java:1865:in `each'
/home/runner/work/jruby/jruby/spec/ruby/library/cgi/cookie/name_spec.rb:4:in `<main>'
org/jruby/RubyKernel.java:1052:in `load'
org/jruby/RubyBasicObject.java:2677:in `instance_exec'
org/jruby/RubyArray.java:1865:in `each'

2)
CGI::Cookie#name= sets self's expiration date ERROR
ArgumentError: invalid name: "another name"
/home/runner/work/jruby/jruby/lib/ruby/stdlib/cgi/cookie.rb:108:in `name='
/home/runner/work/jruby/jruby/spec/ruby/library/cgi/cookie/name_spec.rb:17:in `block in <main>'
org/jruby/RubyBasicObject.java:2677:in `instance_exec'
org/jruby/RubyArray.java:[46](https://github.com/jruby/jruby/actions/runs/3535817028/jobs/5934245109#step:7:47)86:in `all?'
org/jruby/RubyArray.java:1865:in `each'
/home/runner/work/jruby/jruby/spec/ruby/library/cgi/cookie/name_spec.rb:14:in `<main>'
org/jruby/RubyKernel.java:1052:in `load'
org/jruby/RubyBasicObject.java:2677:in `instance_exec'
org/jruby/RubyArray.java:1865:in `each'

3)
CGI::Cookie.parse parses a raw cookie string into a hash of Cookies ERROR
ArgumentError: invalid name: "first cookie"
/home/runner/work/jruby/jruby/lib/ruby/stdlib/cgi/cookie.rb:108:in `name='
/home/runner/work/jruby/jruby/lib/ruby/stdlib/cgi/cookie.rb:79:in `initialize'
org/jruby/RubyClass.java:911:in `new'
/home/runner/work/jruby/jruby/lib/ruby/stdlib/cgi/cookie.rb:195:in `block in parse'
org/jruby/RubyArray.java:1865:in `each'
/home/runner/work/jruby/jruby/lib/ruby/stdlib/cgi/cookie.rb:187:in `parse'
/home/runner/work/jruby/jruby/spec/ruby/library/cgi/cookie/parse_spec.rb:10:in `block in <main>'
org/jruby/RubyBasicObject.java:2677:in `instance_exec'
org/jruby/RubyArray.java:4686:in `all?'
org/jruby/RubyArray.java:1865:in `each'
/home/runner/work/jruby/jruby/spec/ruby/library/cgi/cookie/parse_spec.rb:4:in `<main>'
org/jruby/RubyKernel.java:10[52](https://github.com/jruby/jruby/actions/runs/3535817028/jobs/5934245109#step:7:53):in `load'
org/jruby/RubyBasicObject.java:2677:in `instance_exec'
org/jruby/RubyArray.java:1865:in `each'

4)
CGI::Cookie.parse does not use , for cookie separators ERROR
ArgumentError: invalid name: "first cookie"
/home/runner/work/jruby/jruby/lib/ruby/stdlib/cgi/cookie.rb:108:in `name='
/home/runner/work/jruby/jruby/lib/ruby/stdlib/cgi/cookie.rb:79:in `initialize'
org/jruby/RubyClass.java:911:in `new'
/home/runner/work/jruby/jruby/lib/ruby/stdlib/cgi/cookie.rb:195:in `block in parse'
org/jruby/RubyArray.java:1865:in `each'
/home/runner/work/jruby/jruby/lib/ruby/stdlib/cgi/cookie.rb:187:in `parse'
/home/runner/work/jruby/jruby/spec/ruby/library/cgi/cookie/parse_spec.rb:18:in `block in <main>'
org/jruby/RubyBasicObject.java:2677:in `instance_exec'
org/jruby/RubyArray.java:4686:in `all?'
org/jruby/RubyArray.java:1865:in `each'
/home/runner/work/jruby/jruby/spec/ruby/library/cgi/cookie/parse_spec.rb:4:in `<main>'
org/jruby/RubyKernel.java:1052:in `load'
org/jruby/RubyBasicObject.java:2677:in `instance_exec'
org/jruby/RubyArray.java:18[65](https://github.com/jruby/jruby/actions/runs/3535817028/jobs/5934245109#step:7:66):in `each'

@hsbt
Copy link
Member

hsbt commented Nov 23, 2022

This is already fixed at ruby/ruby@36f297e

@headius
Copy link
Author

headius commented Nov 23, 2022

So that change will go into v0.1.0.3 and other maintenance releases? We need to get the security fix out for JRuby 9.3 ASAP, but the 2.7-only test and this regression have blocked us.

@hsbt
Copy link
Member

hsbt commented Nov 23, 2022

There is no change in ruby/cgi repo. They are only in https://github.com/ruby/spec.

@headius
Copy link
Author

headius commented Nov 23, 2022

Oh I see, then either @eregon or I will update JRuby's copy of the specs so we can move forward with the security release.

@headius
Copy link
Author

headius commented Nov 23, 2022

Thank you for the help here!

@headius headius closed this as completed Nov 23, 2022
@hsbt
Copy link
Member

hsbt commented Nov 23, 2022

👍 Your welcome. We may move them to this repo from ruby/spec in the future.

@headius
Copy link
Author

headius commented Nov 24, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants