From 866ea0b9f983229f53997dd9c87212281683f3df Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Thu, 8 Dec 2016 03:54:12 +0900 Subject: [PATCH] Fixnum and Bignum are unified into Integer since Ruby 2.4 see: https://bugs.ruby-lang.org/issues/12005 --- spec/commands/ls_spec.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/spec/commands/ls_spec.rb b/spec/commands/ls_spec.rb index 0fc489b..d89fcc2 100644 --- a/spec/commands/ls_spec.rb +++ b/spec/commands/ls_spec.rb @@ -48,8 +48,15 @@ end describe "immediates" do - it "should work on Fixnum" do - pry_eval("ls 5").should =~ /Fixnum#methods:.*modulo/m + # Ruby 2.4+ + if 5.class.name == 'Integer' + it "should work on Integer" do + expect(pry_eval("ls 5")).to match(/Integer#methods:.*modulo/m) + end + else + it "should work on Fixnum" do + expect(pry_eval("ls 5")).to match(/Fixnum#methods:.*modulo/m) + end end end