We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c95ee78 commit 50db8f8Copy full SHA for 50db8f8
1 file changed
test/irb/test_context.rb
@@ -646,11 +646,11 @@ def test_prompt_main_inspect_escape
646
647
def test_prompt_part_cached
648
main = Object.new
649
- def main.to_s; "to_s#{rand}"; end
650
- def main.inspect; "inspect#{rand}"; end
+ def main.to_s; "to_s#{rand(10000)}"; end
+ def main.inspect; "inspect#{rand(10000)}"; end
651
irb = IRB::Irb.new(IRB::WorkSpace.new(main), TestInputMethod.new)
652
format = '[%m %M %m %M]>'
653
- pattern = /\A\[(to_s[\d.]+) (inspect[\d.]+) \1 \2\]>\z/
+ pattern = /\A\[(to_s\d+) (inspect\d+) \1 \2\]>\z/
654
655
prompt1, prompt2 = nil
656
irb.send(:with_prompt_part_cached) do
0 commit comments