Skip to content

Commit de7d2a2

Browse files
Copilotkwerle
andauthored
Migrate to Ruby 4.0 (#126)
* Initial plan * Update to Ruby 4.0: Update Dockerfile and gemspec for Ruby 4.0 compatibility Co-authored-by: kwerle <23320+kwerle@users.noreply.github.com> * Update CHANGELOG for Ruby 4.0 migration Co-authored-by: kwerle <23320+kwerle@users.noreply.github.com> * Update RuboCop TargetRubyVersion to 4.0 Co-authored-by: kwerle <23320+kwerle@users.noreply.github.com> * Build tweaks * Cops --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kwerle <23320+kwerle@users.noreply.github.com> Co-authored-by: Kurt Werle <kurt@CircleW.org>
1 parent a33eddd commit de7d2a2

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ plugins:
1414
- rubocop-rake
1515

1616
AllCops:
17-
TargetRubyVersion: 3.3 # 4.0 not yet afailable Tue Dec 30 15:07:23 PST 2025
17+
TargetRubyVersion: 4.0
1818
NewCops: enable
1919
Exclude:
2020
- 'spec/fixture_files/**/*'

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
#
33
# For development:
44
# docker run -it -v $PWD:/project -v $PWD:/tmp/src -w /tmp/src ruby_language_server sh -c 'bundle && guard'
5-
FROM ruby:3.3-alpine
5+
FROM ruby:4.0-alpine
66
LABEL maintainer="kurt@CircleW.org"
77

8-
RUN gem update bundler
8+
# RUN gem update bundler - Skipping as Ruby 4.0 comes with compatible bundler
99

1010
# Needed for byebug and some other gems
1111
RUN apk update
@@ -19,7 +19,7 @@ RUN curl -O -L https://github.com/mateusza/SQLite-Levenshtein/archive/master.zip
1919
RUN unzip master.zip
2020
WORKDIR /usr/local/src/SQLite-Levenshtein-master
2121
RUN ./configure
22-
RUN make -j 8 install
22+
RUN make install
2323

2424
WORKDIR /app
2525
RUN rm -rf /usr/local/src

ruby_language_server.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
1414
spec.description = 'Provide a language server implementation for ruby in ruby. See https://microsoft.github.io/language-server-protocol/ "A Language Server is meant to provide the language-specific smarts and communicate with development tools over a protocol that enables inter-process communication."'
1515
spec.homepage = 'https://github.com/kwerle/ruby_language_server'
1616
spec.license = 'MIT'
17-
spec.required_ruby_version = '>=3.3.0'
17+
spec.required_ruby_version = '>=4.0.0'
1818

1919
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
2020
# to allow pushing to a single host or delete this section to allow pushing to any host.

spec/lib/ruby_language_server/completion_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ def baz; end
4242
let(:all_scopes) { @scope_parser.root_scope.self_and_descendants }
4343
let(:nar_naz_scope) { all_scopes.find_by_path('Foo::Nar#naz') }
4444

45-
def scope_completions(*args)
46-
RubyLanguageServer::Completion.send(:scope_completions, *args)
45+
def scope_completions(*)
46+
RubyLanguageServer::Completion.send(:scope_completions, *)
4747
end
4848

49-
def scope_completions_in_target_context(*args)
50-
RubyLanguageServer::Completion.send(:scope_completions_in_target_context, *args)
49+
def scope_completions_in_target_context(*)
50+
RubyLanguageServer::Completion.send(:scope_completions_in_target_context, *)
5151
end
5252

5353
describe '.completion' do

0 commit comments

Comments
 (0)