euler 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data.tar.gz.sig +1 -1
  2. data/History.txt +4 -0
  3. data/lib/euler.rb +2 -1
  4. metadata +2 -2
  5. metadata.gz.sig +0 -0
data.tar.gz.sig CHANGED
@@ -1 +1 @@
1
- SB��f�ĵ�n�׎6;&�hOD
1
+ v�����Y=��՛�A��d�E�9�f="�̶���ӓVg�Lz�Y�_����&ɔ�u���0�o��ì@��n�ߛ(W[z�D��D;��|�,��q�����Ҵ-�܏��%�Z�Ő�ZĭECtL6��8��C�HJ��+�n�3Z�Uw�[����t��Z�^n!:E&�j7ֹV��-y��d� �eԃ�X��[3��. �2…d��� v�[�G�~�^����mu��|��5_?gER\�s�&�x1%�j�2
@@ -1,4 +1,8 @@
1
+ === 1.0.5 /
2
+ * Fixed another error in Integer#is_fibonacci?
3
+
1
4
  === 1.0.4 /
5
+ * Fixed an error in Integer#is_fibonacci?
2
6
 
3
7
  === 1.0.3 / 2008-08-26
4
8
  * Now added Rakefile for easy development.
@@ -1,6 +1,6 @@
1
1
  # The module that contains all the methods.
2
2
  module Euler
3
- VERSION = "1.0.4"
3
+ VERSION = "1.0.5"
4
4
  extend self
5
5
  attr_reader :primes, :sieve, :fibonaccis
6
6
  # Several methods for the Integer class.
@@ -94,6 +94,7 @@ module Euler
94
94
  # 1.is_fibonacci? # => true
95
95
  # 4.is_fibonacci? # => true
96
96
  def is_fibonacci?
97
+ return true if self == 1
97
98
  a, b = Math.sqrt((5*(self**2))+4), Math.sqrt((5*(self**2))-4)
98
99
  return true if (a.to_i == a and b.to_i != b) or (a.to_i != a && b.to_i == b)
99
100
  return false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: euler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Skalnik
@@ -30,7 +30,7 @@ cert_chain:
30
30
  jjVX87g40jCN9NIGt+c=
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2008-10-04 00:00:00 -04:00
33
+ date: 2008-10-12 00:00:00 -04:00
34
34
  default_executable:
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
metadata.gz.sig CHANGED
Binary file