summaryrefslogtreecommitdiff
path: root/spec/ruby/core/integer/pred_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/integer/pred_spec.rb')
-rw-r--r--spec/ruby/core/integer/pred_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/ruby/core/integer/pred_spec.rb b/spec/ruby/core/integer/pred_spec.rb
new file mode 100644
index 0000000000..fce536b5a2
--- /dev/null
+++ b/spec/ruby/core/integer/pred_spec.rb
@@ -0,0 +1,11 @@
+require_relative '../../spec_helper'
+
+describe "Integer#pred" do
+ it "returns the Integer equal to self - 1" do
+ 0.pred.should.eql?(-1)
+ -1.pred.should.eql?(-2)
+ bignum_value.pred.should.eql?(bignum_value(-1))
+ fixnum_min.pred.should.eql?(fixnum_min - 1)
+ 20.pred.should.eql?(19)
+ end
+end
an>Introduce beginless range [Feature#14799]mame 2019-03-11Removed from standard library. No one maintains it from Ruby 2.0.0.hsbt 2019-02-02NEWS: use note-listnobu 2019-01-18[DOC] mention rb_str_modifynobu 2019-01-10Update refinements docstenderlove 2018-12-26doc/extension.ja.rdoc (rb_gc_register_mark_object): fix prototypenormal 2018-12-25[DOC] Remove heading with no content [ci skip]kazu 2018-12-25[DOC] Add doc/NEWS-2.6.0 [ci skip]kazu 2018-12-25[DOC] Fix typos [ci skip]kazu 2018-12-25Mention rb_gc_register_mark_object [ci skip]nobu 2018-12-24Small improvement in refinements docsstomar 2018-12-12range.c: Documentation on endless ranges.marcandre 2018-12-11doc/contributing.rdoc: remove IA-64 from active platform listmame 2018-11-17[DOC] rational and imaginary literals [ci skip]nobu 2018-11-02Added bundler as default gems. Revisit [Feature #12733]hsbt 2018-10-21Improve doc of Regexp about "ignore case" behavior [Misc #10836]aycabta 2018-10-20Improve safe navigation operator's docs [Misc #15109]aycabta