Skip to content

See if tests pass against Ruby 3.3#1677

Merged
olleolleolle merged 4 commits into
lostisland:1.xfrom
jturel:test_ruby_33_1x
Jun 1, 2026
Merged

See if tests pass against Ruby 3.3#1677
olleolleolle merged 4 commits into
lostisland:1.xfrom
jturel:test_ruby_33_1x

Conversation

@jturel

@jturel jturel commented May 29, 2026

Copy link
Copy Markdown

Description

We are updating our application to Ruby 3.3 while trying to minimize dependency updates. Hoping to assess Ruby 3.3 compatibility here.

Todos

List any remaining work that needs to be done, i.e:

  • Tests
  • Documentation

Additional Notes

Optional section

@olleolleolle

olleolleolle commented May 29, 2026

Copy link
Copy Markdown
Member

@jturel If you want to, remove Yard-Junk step for this 1.x branch. (It's no longer in the default branch.)

@olleolleolle

Copy link
Copy Markdown
Member

The test expectation can probably be fixed by someone enterprising:

Failures:
  1) Faraday proxies to default_connection uses method_missing on Faraday if there is no proxyable method
     Failure/Error:
       expect { Faraday.this_method_does_not_exist }.to raise_error(
         NoMethodError,
         "undefined method `this_method_does_not_exist' for Faraday:Module"
       )
       expected NoMethodError with "undefined method `this_method_does_not_exist' for Faraday:Module", got #<NoMethodError: undefined method `this_method_does_not_exist' for module Faraday> with backtrace:
         # ./lib/faraday.rb:182:in `method_missing'
         # ./spec/faraday_spec.rb:21:in `block (4 levels) in <top (required)>'
         # ./spec/faraday_spec.rb:21:in `block (3 levels) in <top (required)>'
     # ./spec/faraday_spec.rb:21:in `block (3 levels) in <top (required)>'

@jturel

jturel commented May 29, 2026

Copy link
Copy Markdown
Author

@olleolleolle on it :)

This PR fixes the following test failure using Ruby 3.3.0dev:

```console
$ ruby -v
ruby 3.3.0dev (2023-08-14T15:48:39Z master 52837fcec2) [x86_64-darwin22]
$ bundle exec rspec spec/faraday_spec.rb

Randomized with seed 57031

Faraday
  has a version number
  proxies to default_connection
    uses method_missing on Faraday if there is no proxyable method (FAILED - 1)
    proxies methods that exist on the default_connection
    proxied methods can be accessed

Failures:

  1) Faraday proxies to default_connection uses method_missing on Faraday if there is no proxyable method
     Failure/Error:
       expect { Faraday.this_method_does_not_exist }.to raise_error(
         NoMethodError, expected_message
       )

       expected NoMethodError with "undefined method `this_method_does_not_exist' for Faraday:Module",
       got #<NoMethodError: undefined method `this_method_does_not_exist' for module Faraday> with backtrace:
         # ./lib/faraday.rb:147:in `method_missing'
         # ./spec/faraday_spec.rb:27:in `block (4 levels) in <top (required)>'
         # ./spec/faraday_spec.rb:27:in `block (3 levels) in <top (required)>'
     # ./spec/faraday_spec.rb:27:in `block (3 levels) in <top (required)>'
```

That error message has been changed by ruby/ruby@e7b8d32e in Ruby 3.3.0dev.

cf. https://bugs.ruby-lang.org/issues/18285

So the test error message is changed:

Ruby 3.2 or lower:

```
undefined method `this_method_does_not_exist' for Faraday:Module
```

Ruby 3.3.0dev:

```
NoMethodError: undefined method `this_method_does_not_exist' for module Faraday
```

(cherry picked from commit 7ce6865)
@jturel jturel force-pushed the test_ruby_33_1x branch from fb45d5d to c341c9d Compare May 29, 2026 15:46
@jturel

jturel commented May 29, 2026

Copy link
Copy Markdown
Author

Cherry-picked a commit from main which addressed that test failure.

(cherry picked from commit 230fa1b)
@olleolleolle olleolleolle marked this pull request as ready for review June 1, 2026 06:47
@olleolleolle olleolleolle merged commit 6230807 into lostisland:1.x Jun 1, 2026
5 checks passed
@jturel jturel deleted the test_ruby_33_1x branch June 1, 2026 12:47
@jturel

jturel commented Jun 1, 2026

Copy link
Copy Markdown
Author

Thanks @olleolleolle

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants