diff --git a/mode/ruby/ruby.js b/mode/ruby/ruby.js index 5d9288666f..b84dde29e3 100644 --- a/mode/ruby/ruby.js +++ b/mode/ruby/ruby.js @@ -63,7 +63,7 @@ CodeMirror.defineMode("ruby", function(config) { } else if (ch == "#") { stream.skipToEnd(); return "comment"; - } else if (ch == "<" && (m = stream.match(/^<(-)?[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/))) { + } else if (ch == "<" && (m = stream.match(/^<([-~])[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/))) { return chain(readHereDoc(m[2], m[1]), stream, state); } else if (ch == "0") { if (stream.eat("x")) stream.eatWhile(/[\da-fA-F]/);