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

Add Support for Ruby 3.3 #103

Merged
merged 1 commit into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
matrix:
gemfile: [rails_6_1, rails_7_0, rails_7_1, rails_master]
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
ruby: ['3.0', 3.1, 3.2]
ruby: ['3.0', 3.1, 3.2, 3.3]
runs-on: ubuntu-latest
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ rvm:
- 3.0
- 3.1
- 3.2
- 3.3
script: bin/test
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.2.3
FROM ruby:3.3.0
RUN apt-get update -qq

WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion lib/rbexy/runtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def evaluate(code)
@output_buffer = ActionView::OutputBuffer.new
instance_eval(code)
rescue => e
e.set_backtrace(e.backtrace.map { |l| l.gsub("(eval)", "(rbx template string)") })
e.set_backtrace(e.backtrace.map { |l| l.gsub(/\(eval( at [^)]+)?\)/, "(rbx template string)") })
raise e
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/.ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-3.2.3
ruby-3.3.0
3 changes: 2 additions & 1 deletion spec/integration/component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ def call
expect { ErroringComponent.new(view_context).render_in }
.to raise_error do |error|
expect(error.backtrace[0]).to include "erroring_component.rbx:3"
expect(error.backtrace[1]).to include "erroring_component.rbx:3:in `times'"
# Ruby <3.3 show the rbx file name, 3.3 shows <internal:numeric>:237
expect(error.backtrace[1]).to include "in `times'"
expect(error.backtrace[2]).to include "component_spec.rb"
end
end
Expand Down
Loading