Skip to content

[nil] is passed to auto_indent_proc when exit with CTRL+d #556

@tompng

Description

@tompng

Description

require 'reline'
Reline.auto_indent_proc=->(lines,*){raise "lines was [nil]" if lines == [nil]}
Reline.readmultiline('>'){true}
>(press CTRL+d)
sample.rb:2:in `block in <main>': lines was [nil] (RuntimeError)

I expect lines passed to auto_indent_proc to be an array of string.

IRB should specially handle [nil] to not raise error on exit
ruby/irb#515 (comment)

Terminal Emulator

macOS Terminal.app

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions