diff options
author | Nobuhiro IMAI <nov@yo.rim.or.jp> | 2021-01-06 19:05:46 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2021-01-08 13:25:18 +0900 |
commit | f59477523053b67eac409b6595bfe5db962aab3d (patch) | |
tree | 4370ffa39c3746e0b91253de3800acce023c9343 /test | |
parent | 4bb683a570043d169049d9741c319a297acd607b (diff) |
[ruby/irb] do not escape a predicate method for doc namespace
* Fixes #88
https://github.com/ruby/irb/commit/d431a30af4
Diffstat (limited to 'test')
-rw-r--r-- | test/irb/test_completion.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb index a765bbf3a5..39d4be4a5a 100644 --- a/test/irb/test_completion.rb +++ b/test/irb/test_completion.rb @@ -47,5 +47,13 @@ module TestIRB assert_include candidates, word end end + + def test_complete_predicate? + candidates = IRB::InputCompletor.retrieve_completion_data("1.posi", bind: binding) + assert_equal %w[1.positive?], candidates + + namespace = IRB::InputCompletor.retrieve_completion_data("1.positive?", bind: binding, doc_namespace: true) + assert_equal "Integer.positive?", namespace + end end end |