unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30075: etags misdetects ruby sharp-bang sequence
@ 2018-01-10 23:36 Dmitry Gutov
  2018-01-11 16:39 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Gutov @ 2018-01-10 23:36 UTC (permalink / raw)
  To: 30075

[-- Attachment #1: Type: text/plain, Size: 237 bytes --]

Here's a file that is parsed wrongly when it has no .rb extension. The 
sharp-bang sequence at the top looks correct to me.

Attaching both the input file and the generated tags file.

The problem is present both in emacs-26 and master.

[-- Attachment #2: BAD_TAGS --]
[-- Type: application/octet-stream, Size: 98 bytes --]

[-- Attachment #3: no_ext_ruby_test --]
[-- Type: text/plain, Size: 403 bytes --]

#!/usr/bin/env ruby

module SimpleCov
  module ResultMerger
    class << self
      def resultset_files
        Dir.glob()
      end

      def foo
        resultset_files.map do |path|
          begin
            JSON.parse(File.read(path))
          rescue
            {}
          end
        end
      end

      def resultset
        resultset_hashes.reduce({}, :merge)
      end
    end
  end
end

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#30075: etags misdetects ruby sharp-bang sequence
  2018-01-10 23:36 bug#30075: etags misdetects ruby sharp-bang sequence Dmitry Gutov
@ 2018-01-11 16:39 ` Eli Zaretskii
  2018-01-11 22:07   ` Dmitry Gutov
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2018-01-11 16:39 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 30075

> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Thu, 11 Jan 2018 02:36:55 +0300
> 
> Here's a file that is parsed wrongly when it has no .rb extension. The 
> sharp-bang sequence at the top looks correct to me.

No one taught etags the name(s) of the Ruby interpreter(s), and nobody
told it about the "#!/usr/bin/env FOO" way of specifying an interpreter.

Should be fixed now on the emacs-26 branch.

Thanks.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#30075: etags misdetects ruby sharp-bang sequence
  2018-01-11 16:39 ` Eli Zaretskii
@ 2018-01-11 22:07   ` Dmitry Gutov
  2018-01-11 22:50     ` Dmitry Gutov
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Gutov @ 2018-01-11 22:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 30075

On 1/11/18 7:39 PM, Eli Zaretskii wrote:

> No one taught etags the name(s) of the Ruby interpreter(s), and nobody
> told it about the "#!/usr/bin/env FOO" way of specifying an interpreter.
> 
> Should be fixed now on the emacs-26 branch.

Looks fixed, thank you!





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#30075: etags misdetects ruby sharp-bang sequence
  2018-01-11 22:07   ` Dmitry Gutov
@ 2018-01-11 22:50     ` Dmitry Gutov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Gutov @ 2018-01-11 22:50 UTC (permalink / raw)
  To: 30075-done

On 1/12/18 1:07 AM, Dmitry Gutov wrote:
> On 1/11/18 7:39 PM, Eli Zaretskii wrote:
> 
>> No one taught etags the name(s) of the Ruby interpreter(s), and nobody
>> told it about the "#!/usr/bin/env FOO" way of specifying an interpreter.
>>
>> Should be fixed now on the emacs-26 branch.
> 
> Looks fixed, thank you!

Closing.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-11 22:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-10 23:36 bug#30075: etags misdetects ruby sharp-bang sequence Dmitry Gutov
2018-01-11 16:39 ` Eli Zaretskii
2018-01-11 22:07   ` Dmitry Gutov
2018-01-11 22:50     ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).