Skip to content

Commit 4415747

Browse files
committed
JT: simplify truffleruby_compiler?
1 parent e0b196f commit 4415747

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tool/jt.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def truffleruby_compiler?
245245
return @truffleruby_compiler = true if truffleruby_native?
246246

247247
# Detect if the compiler is present by reading the $graalvm_home/release file
248-
graalvm_home = File.expand_path("../../../..#{'/..' * language_dir.count('/')}", ruby_launcher)
248+
graalvm_home = File.expand_path("..#{'/..' * (language_dir.count('/') + 1)}", ruby_home)
249249
@truffleruby_compiler = File.readlines("#{graalvm_home}/release").grep(/^COMMIT_INFO=/).any? do |line|
250250
line.include?('"compiler":') || line.include?("'compiler':")
251251
end

0 commit comments

Comments
 (0)