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

Fix "lambda method requires a literal block" error (Ruby 3.3) #2141

Merged
merged 1 commit into from
Sep 26, 2023

Commits on Sep 22, 2023

  1. Fix "lambda method requires a literal block" (Ruby 3.3)

    Running the test suite on Ruby 3.2 produces this validation warning:
    
    ```
    $ RUBYOPT=-W bundle e rspec spec/lib/capistrano/configuration_spec.rb
    ...
    warning: lambda without a literal block is deprecated; use the proc without lambda instead
    ```
    
    On Ruby 3.3 (head), it crashes because the deprecation is now an
    error[^1]:
    
    ```
    ArgumentError:
      the lambda method requires a literal block
    ```
    
    This commit fixes the problem by replacing `lambda` with `proc`, as
    instructed in the deprecation warning.
    
    [^1]: https://bugs.ruby-lang.org/issues/19777
    mattbrictson committed Sep 22, 2023
    Configuration menu
    Copy the full SHA
    650f209 View commit details
    Browse the repository at this point in the history