Project

General

Profile

Actions

Bug #20732

closed

prism emits "mismatched indentations" warning in eval

Added by mame (Yusuke Endoh) 2 months ago. Updated 2 months ago.

Status:
Closed
Target version:
-
[ruby-core:119154]

Description

eval(<<-EOC)
  if @check
end
EOC
$ ruby --parser=parse.y -w t.rb
$ ruby --parser=prism -w t.rb
(eval at t.rb:1):2: warning: mismatched indentations at 'end' with 'if' at 1

This issue actually occurs in rss gem.

https://github.com/ruby/rss/blob/8a5b056eab591525e9c14ae1cd6e97ebae386be8/lib/rss/rss.rb#L214-L220
https://github.com/ruby/rss/blob/8a5b056eab591525e9c14ae1cd6e97ebae386be8/lib/rss/rss.rb#L316-L321

Actions

Also available in: Atom PDF

Like0
Like0Like0