Issue #15853 has been updated by jeremyevans0 (Jeremy Evans).

File fix-readline-4.3-test-regression-v2.patch added

mame (Yusuke Endoh) wrote:
> ```
> -        if !defined?(Reline) or Readline != Reline # Reline's rendering logic is tricky
> +        unless defined?(Reline) or Readline == Reline or /\A4\.3\z/n.match(Readline::VERSION) # Reline's rendering logic is tricky
> ```
> 
> The new condition looks not to work when `Reline` is not defined.
> 
> (Personally I want to avoid `unless` for complex condition :-)

Correct, sorry about that.  How about just eliminating the assertion, since it is readline implementation and version dependent, and of questionable use (who calls `Readline.output.read` after `Readline.readline` and wants the readline prompt and input to appear)?  Attached is a patch for that.

----------------------------------------
Bug #15853: Fix readline test regression when using Readline 4.3
https://bugs.ruby-lang.org/issues/15853#change-78040

* Author: jeremyevans0 (Jeremy Evans)
* Status: Open
* Priority: Normal
* Assignee: aycabta (aycabta .)
* Target version: 
* ruby -v: 
* Backport: 2.4: DONTNEED, 2.5: DONTNEED, 2.6: DONTNEED
----------------------------------------
commit:c754e979d3eeca51f1b13778f19f347df3da656e removed the check for Readline 4.3 in a test.  Previously, the whole test was skipped on Readline 4.3.  However, it turns out that Readline 4.3 runs the test correctly if you skip the same assertion that is skipped when Reline is used.  The attached patch skips that assertion when `Readline::VERSION` is 4.3.

We may want to consider dropping this assertion completely, it seems to be readline implementation and version dependent behavior.

---Files--------------------------------
fix-readline-4.3-test-regression.patch (1.3 KB)
fix-readline-4.3-test-regression-v2.patch (1.28 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>