Skip to content

Distribute and run LLMs with a single file.

Fix Ruby builtins in web gui

Justine Tunney8413a217cda3
diff --git a/llamafile/server/www/highlight_ruby.js b/llamafile/server/www/highlight_ruby.js
index 2d35f8df..2a924849 100644
--- a/llamafile/server/www/highlight_ruby.js
+++ b/llamafile/server/www/highlight_ruby.js
@@ -462,7 +462,7 @@ class HighlightRuby extends Highlighter {
} else if (this.word == "class" || this.word == "module") {
this.expect = HighlightRuby.EXPECT_OPERATOR;
}
- } else if (this.expect = HighlightRuby.EXPECT_EXPR &&
+ } else if (this.expect == HighlightRuby.EXPECT_EXPR &&
RUBY_BUILTINS.has(this.word)) {
this.push("span", "builtin");
this.append(this.word);