Skip to content

Commit c0b38e3

Browse files
authored
Merge pull request #380 from ruby-go-gem/ruby_4.0
Support Ruby 4.0
2 parents 87dcf11 + 03f2b1d commit c0b38e3

File tree

12 files changed

+9452
-11
lines changed

12 files changed

+9452
-11
lines changed

.github/workflows/matrix.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
],
66
"ruby": [
77
"3.3",
8-
"3.4"
8+
"3.4",
9+
"4.0"
910
]
1011
}

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ group :test do
2323
gem "steep"
2424
gem "test-unit"
2525
gem "uri", ">= 1.0.3"
26+
27+
# FIXME: Workaround for Ruby 4.0+
28+
# ref. https://github.com/banister/binding_of_caller/pull/90
29+
gem "binding_of_caller", github: "kivikakk/binding_of_caller", branch: "push-yrnnzolypxun"
2630
end
2731

2832
gemspec path: "./_gem/"

Gemfile.lock

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
GIT
2+
remote: https://github.com/kivikakk/binding_of_caller.git
3+
revision: c590ef401ab8311d9e6c2b55cb8a7fa4553c18ab
4+
branch: push-yrnnzolypxun
5+
specs:
6+
binding_of_caller (1.0.1)
7+
debug_inspector (>= 1.2.0)
8+
19
PATH
210
remote: _gem
311
specs:
@@ -23,8 +31,6 @@ GEM
2331
base64 (0.2.0)
2432
benchmark (0.4.0)
2533
bigdecimal (3.1.9)
26-
binding_of_caller (1.0.1)
27-
debug_inspector (>= 1.2.0)
2834
concurrent-ruby (1.3.5)
2935
connection_pool (2.5.0)
3036
csv (3.3.3)
@@ -43,7 +49,8 @@ GEM
4349
rb-fsevent (~> 0.10, >= 0.10.3)
4450
rb-inotify (~> 0.9, >= 0.9.10)
4551
logger (1.6.6)
46-
minitest (5.25.5)
52+
minitest (6.0.0)
53+
prism (~> 1.5)
4754
multi_json (1.15.0)
4855
mutex_m (0.3.0)
4956
net-scp (4.1.0)
@@ -178,6 +185,7 @@ PLATFORMS
178185
ruby
179186

180187
DEPENDENCIES
188+
binding_of_caller!
181189
go_gem!
182190
rake
183191
rake-compiler
@@ -201,7 +209,7 @@ CHECKSUMS
201209
base64 (0.2.0) sha256=0f25e9b21a02a0cc0cea8ef92b2041035d39350946e8789c562b2d1a3da01507
202210
benchmark (0.4.0) sha256=0f12f8c495545e3710c3e4f0480f63f06b4c842cc94cec7f33a956f5180e874a
203211
bigdecimal (3.1.9) sha256=2ffc742031521ad69c2dfc815a98e426a230a3d22aeac1995826a75dabfad8cc
204-
binding_of_caller (1.0.1) sha256=2b2902abff4246ddcfbc4da9b69bc4a019e22aeb300c2ff6289a173d4b90b29a
212+
binding_of_caller (1.0.1)
205213
concurrent-ruby (1.3.5) sha256=813b3e37aca6df2a21a3b9f1d497f8cbab24a2b94cab325bffe65ee0f6cbebc6
206214
connection_pool (2.5.0) sha256=233b92f8d38e038c1349ccea65dd3772727d669d6d2e71f9897c8bf5cd53ebfc
207215
csv (3.3.3) sha256=7e2966befb7bdaf7d5e9b36e1de73e6a5e7a72f584f180a1726aec88a1b0a900
@@ -218,7 +226,7 @@ CHECKSUMS
218226
lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
219227
listen (3.9.0) sha256=db9e4424e0e5834480385197c139cb6b0ae0ef28cc13310cfd1ca78377d59c67
220228
logger (1.6.6) sha256=dd618d24e637715472732e7eed02e33cfbdf56deaad225edd0f1f89d38024017
221-
minitest (5.25.5) sha256=391b6c6cb43a4802bfb7c93af1ebe2ac66a210293f4a3fb7db36f2fc7dc2c756
229+
minitest (6.0.0) sha256=4ca597fc1d735ea18d2b4b98c5fb1d5a6da4a6f35ddf32bd5fa3eded33a453be
222230
multi_json (1.15.0) sha256=1fd04138b6e4a90017e8d1b804c039031399866ff3fbabb7822aea367c78615d
223231
mutex_m (0.3.0) sha256=cfcb04ac16b69c4813777022fdceda24e9f798e48092a2b817eb4c0a782b0751
224232
net-scp (4.1.0) sha256=a99b0b92a1e5d360b0de4ffbf2dc0c91531502d3d4f56c28b0139a7c093d1a5d
@@ -271,4 +279,4 @@ CHECKSUMS
271279
zlib (3.2.2) sha256=908e61263f99c1371b5422581e2d6663bd37c6b04ae13b5f8cb10b0d09379f40
272280

273281
BUNDLED WITH
274-
4.0.0
282+
4.0.3

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,15 @@ open http://localhost:6060/pkg/github.com/ruby-go-gem/go-gem-wrapper/ruby/
152152
3. Update [_gem/lib/go_gem/version.rb](_gem/lib/go_gem/version.rb)
153153
4. Run `bundle exec rake release`
154154

155+
### Support new ruby version
156+
1. Run `go mod vendor`
157+
2. Run `bundle install`
158+
3. Add new version to [.github/workflows/matrix.json](.github/workflows/matrix.json)
159+
4. Update `spec.required_ruby_version` in [_gem/go_gem.gemspec](_gem/go_gem.gemspec)
160+
5. Add new version to [_tools/ruby_h_to_go/config.yml](_tools/ruby_h_to_go/config.yml)
161+
6. Run `bundle exec rake ruby_h_to_go` in latest ruby version
162+
7. Run `bundle exec rake ruby_h_to_go` in [`default_tag`](_tools/ruby_h_to_go/config.yml) ruby version
163+
155164
## Original idea
156165
[Ruby meets Go - RubyKaigi 2015](https://rubykaigi.org/2015/presentations/mmasaki/)
157166

_gem/go_gem.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
1212
spec.description = "Helpers for compiling Go extensions for ruby"
1313
spec.homepage = "https://github.com/ruby-go-gem/go-gem-wrapper"
1414
spec.license = "MIT"
15-
spec.required_ruby_version = [">= 3.3.0", "< 3.5.0"]
15+
spec.required_ruby_version = [">= 3.3.0", "< 4.1.0"]
1616

1717
spec.metadata["homepage_uri"] = spec.homepage
1818
spec.metadata["source_code_uri"] = "#{spec.homepage}/tree/main/_gem"

_tools/ruby_h_to_go/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ default_tag: ruby_3_3
44
available_tags:
55
- ruby_3_3
66
- ruby_3_4
7+
- ruby_4_0

ruby/enum_ruby_3_3_generated.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ruby/enum_ruby_4_0_generated.go

Lines changed: 57 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ruby/function_ruby_3_3_generated.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)