diff --git a/doc/internal/opcode.md b/doc/internal/opcode.md index d93d018d4..177bb0cb5 100644 --- a/doc/internal/opcode.md +++ b/doc/internal/opcode.md @@ -69,9 +69,9 @@ sign) of operands. | `OP_EXCEPT` | `B` | `R(a) = exc` | | `OP_RESCUE` | `BB` | `R(b) = R(a).isa?(R(b))` | | `OP_RAISEIF` | `B` | `raise(R(a)) if R(a)` | -| `OP_SSEND` | `BBB` | `R(a) = self.send(Syms(b),R(a+1)..,R(a+n+1):R(a+n+2)..) (c=n|k<<4)` | +| `OP_SSEND` | `BBB` | `R(a) = self.send(Syms(b),R(a+1)..,R(a+n+1):R(a+n+2)..) (c=n\|k<<4)` | | `OP_SSENDB` | `BBB` | `R(a) = self.send(Syms(b),R(a+1)..,R(a+n+1):R(a+n+2)..,&R(a+n+2k+1))` | -| `OP_SEND` | `BBB` | `R(a) = R(a).send(Syms(b),R(a+1)..,R(a+n+1):R(a+n+2)..) (c=n|k<<4)` | +| `OP_SEND` | `BBB` | `R(a) = R(a).send(Syms(b),R(a+1)..,R(a+n+1):R(a+n+2)..) (c=n\|k<<4)` | | `OP_SENDB` | `BBB` | `R(a) = R(a).send(Syms(b),R(a+1)..,R(a+n+1):R(a+n+2)..,&R(a+n+2k+1))` | | `OP_CALL` | `-` | `R(0) = self.call(frame.argc, frame.argv)` | | `OP_SUPER` | `BB` | `R(a) = super(R(a+1),... ,R(a+b+1))` | diff --git a/lib/mruby/doc.rb b/lib/mruby/doc.rb index 573f71aaa..6cc19b0a0 100644 --- a/lib/mruby/doc.rb +++ b/lib/mruby/doc.rb @@ -34,6 +34,7 @@ module MRuby cmt.sub!(/\s*#.*/, "") cmt.sub!(/\b(?=L_\w+\b)/, "OP_") cmt.gsub!(/\b(Irep|Pool|R|Syms)\[([^\[\]]+)\]/, "\\1(\\2)") + cmt.gsub!(/[\\\|]/) { |m| "\\#{m}" } # Ruby-2.5 is not support "Numbered block parameter" end spec = opspecs[opr] or raise "unknown operand type: #{opr}" item = format(%(| %-18s | %-14s | %-58s |\n), "`OP_#{ins}`", "`#{spec[:modified] || opr}`", cmt && "`#{cmt}`")