infinity 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.6
1
+ 0.0.7
@@ -6,3 +6,10 @@ class Fixnum
6
6
  self.__divide(num)
7
7
  end
8
8
  end
9
+ class Float
10
+ alias_method "__divide", "/"
11
+ def /(num)
12
+ return Infinity if num == 0
13
+ self.__divide(num)
14
+ end
15
+ end
@@ -27,6 +27,7 @@ class TestInfinity < Test::Unit::TestCase
27
27
  context "zero" do
28
28
  should "divide by zero" do
29
29
  assert_equal(Infinity, 9/0)
30
+ assert_equal(Infinity, 9.0/0)
30
31
  end
31
32
  end
32
33
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infinity
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 6
10
- version: 0.0.6
9
+ - 7
10
+ version: 0.0.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Daniel Bretoi
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-07 00:00:00 -07:00
18
+ date: 2010-07-10 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -46,7 +46,6 @@ files:
46
46
  - README.rdoc
47
47
  - Rakefile
48
48
  - VERSION
49
- - infinity.gemspec
50
49
  - lib/infinity.rb
51
50
  - lib/infinity/zero.rb
52
51
  - test/helper.rb
@@ -1,53 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{infinity}
8
- s.version = "0.0.6"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Daniel Bretoi"]
12
- s.date = %q{2010-07-07}
13
- s.description = %q{simple lib to deal with infinate numbers}
14
- s.email = %q{daniel@netwalk.org}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- "LICENSE",
21
- "README.rdoc",
22
- "Rakefile",
23
- "VERSION",
24
- "infinity.gemspec",
25
- "lib/infinity.rb",
26
- "lib/infinity/zero.rb",
27
- "test/helper.rb",
28
- "test/test_infinity.rb"
29
- ]
30
- s.homepage = %q{http://github.com/danielb2/infinity}
31
- s.rdoc_options = ["--charset=UTF-8"]
32
- s.require_paths = ["lib"]
33
- s.rubygems_version = %q{1.3.7}
34
- s.summary = %q{simple lib to deal with infinate numbers}
35
- s.test_files = [
36
- "test/helper.rb",
37
- "test/test_infinity.rb"
38
- ]
39
-
40
- if s.respond_to? :specification_version then
41
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
42
- s.specification_version = 3
43
-
44
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
45
- s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
46
- else
47
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
48
- end
49
- else
50
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
51
- end
52
- end
53
-