aboutsummaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-09-18 23:25:20 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2022-09-23 06:44:28 +0900
commit591c3c7a1aae41bb2702dc40609a9bcae0e40ea5 (patch)
treee481ff26a6c14e599014c658d8f3fe00d09969bc /tool
parent4e0db2f75348fd28ae8ffd242044a020e41afef5 (diff)
downloadruby-591c3c7a1aae41bb2702dc40609a9bcae0e40ea5.tar.gz
Automatically setup bundler of bindgen.rb
to easily use it with `tool/mjit/bindgen.rb BUILDDIR` instead of using `make mjit-bindgen`.
Diffstat (limited to 'tool')
-rwxr-xr-xtool/mjit/bindgen.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/tool/mjit/bindgen.rb b/tool/mjit/bindgen.rb
index 5707019266..750fde9805 100755
--- a/tool/mjit/bindgen.rb
+++ b/tool/mjit/bindgen.rb
@@ -1,5 +1,9 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
+
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('./Gemfile', __dir__)
+require 'bundler/setup'
+
require 'etc'
require 'fiddle/import'
require 'set'