diff options
author | Austin Morton <apmorton@users.noreply.github.com> | 2021-10-05 00:21:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 23:21:32 -0500 |
commit | 810134942d0e8af494d53dceade0054fa5086129 (patch) | |
tree | 9709639486c6c68a1974178c5485f9c4a9af818b /lib/compilers/ruby.js | |
parent | a59c3df6535aaf53b8a095d0c664af57764089e5 (diff) | |
download | compiler-explorer-810134942d0e8af494d53dceade0054fa5086129.tar.gz compiler-explorer-810134942d0e8af494d53dceade0054fa5086129.zip |
Avoid calling compilerProps after compiler object construction (#3005)gh-1092
Diffstat (limited to 'lib/compilers/ruby.js')
-rw-r--r-- | lib/compilers/ruby.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/compilers/ruby.js b/lib/compilers/ruby.js index 55f5b7b68..4e32e94ab 100644 --- a/lib/compilers/ruby.js +++ b/lib/compilers/ruby.js @@ -36,6 +36,8 @@ export class RubyCompiler extends BaseCompiler { super(compilerInfo, env); this.compiler.demangler = null; this.demanglerClass = null; + this.disasmScriptPath = + this.compilerProps('disasmScript') || resolvePathFromAppRoot('etc', 'scripts', 'ruby', 'disasm.rb'); } processAsm(result) { @@ -73,15 +75,9 @@ export class RubyCompiler extends BaseCompiler { return {asm: bytecodeResult}; } - getDisasmScriptPath() { - const script = this.compilerProps('disasmScript'); - - return script || resolvePathFromAppRoot('etc', 'scripts', 'ruby', 'disasm.rb'); - } - optionsForFilter(filters, outputFilename) { return [ - this.getDisasmScriptPath(), + this.disasmScriptPath, '--outputfile', outputFilename, '--fname', |