Skip to content

Commit

Permalink
* lib/mathn.rb (Bignum#**): Fixed bignum**fixnum that was broken when…
Browse files Browse the repository at this point in the history
… requiring lib/mathn

  [ruby-core:25740]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
marcandre committed Sep 24, 2009
1 parent 089494f commit 399dace
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
Thu Sep 24 09:41:42 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>

* lib/mathn.rb (Bignum#**): Fixed bignum**fixnum that was broken when
requiring lib/mathn
[ruby-core:25740]

Thu Sep 24 02:21:23 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> Thu Sep 24 02:21:23 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>


* ext/bigdecimal/lib/bigdecimal/math.rb (atan): atan(Infinity) is * ext/bigdecimal/lib/bigdecimal/math.rb (atan): atan(Infinity) is
Expand Down
4 changes: 2 additions & 2 deletions lib/mathn.rb
Expand Up @@ -25,7 +25,7 @@ class Fixnum
remove_method :/ remove_method :/
alias / quo alias / quo


alias power! ** unless defined?(0.power!) alias power! ** unless method_defined? :power!


def ** (other) def ** (other)
if self < 0 && other.round != other if self < 0 && other.round != other
Expand All @@ -41,7 +41,7 @@ class Bignum
remove_method :/ remove_method :/
alias / quo alias / quo


alias power! ** unless defined?(0.power!) alias power! ** unless method_defined? :power!


def ** (other) def ** (other)
if self < 0 && other.round != other if self < 0 && other.round != other
Expand Down
4 changes: 2 additions & 2 deletions lib/rational.rb
Expand Up @@ -7,7 +7,7 @@ class Fixnum
alias quof fdiv alias quof fdiv
alias rdiv quo alias rdiv quo


alias power! ** unless defined?(0.power!) alias power! ** unless method_defined? :power!
alias rpower ** alias rpower **


end end
Expand All @@ -17,7 +17,7 @@ class Bignum
alias quof fdiv alias quof fdiv
alias rdiv quo alias rdiv quo


alias power! ** unless defined?(0.power!) alias power! ** unless method_defined? :power!
alias rpower ** alias rpower **


end end

0 comments on commit 399dace

Please sign in to comment.