<commit_before>require File.dirname(__FILE__) + '/../../spec_helper'
require 'bigdecimal'

describe "BigDecimal#infinite?" do

  it "returns 1 if self is Infinity" do
    # documentation says returns true.
    BigDecimal("Infinity").infinite?.should == 1
  end
  
  it "returns -1 if self is -Infinity" do
    # This is how MRI behaves.
    BigDecimal("-Infinity").infinite?.should == -1
  end

  it "returns not true otherwise" do
    # If nil or false is not really specified in documentation.
    e2_plus = BigDecimal("2E40001")
    e3_minus = BigDecimal("3E-20001")
    really_small_zero = BigDecimal("0E-200000000")
    really_big_zero = BigDecimal("0E200000000000")
    e3_minus.infinite?.should == nil
    e2_plus.infinite?.should == nil
    really_small_zero.infinite?.should == nil<commit_msg>lib/bigdecimal: removed comments now that doc is fixed<commit_after>require File.dirname(__FILE__) + '/../../spec_helper'
require 'bigdecimal'

describe "BigDecimal#infinite?" do

  it "returns 1 if self is Infinity" do
    BigDecimal("Infinity").infinite?.should == 1
  end
  
  it "returns -1 if self is -Infinity" do
    BigDecimal("-Infinity").infinite?.should == -1
  end

  it "returns not true otherwise" do
    e2_plus = BigDecimal("2E40001")
    e3_minus = BigDecimal("3E-20001")
    really_small_zero = BigDecimal("0E-200000000")
    really_big_zero = BigDecimal("0E200000000000")
    e3_minus.infinite?.should == nil
    e2_plus.infinite?.should == nil
    really_small_zero.infinite?.should == nil
{'fraction_non_alphanumeric': 0.12045003309066843, 'fraction_numerical': 0.056915949702183985, 'mean_word_length': 3.7848101265822787, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3728446', 'n_tokens_mistral': 540, 'n_tokens_neox': 485, 'n_words': 125}