# 1.9/mathn: method \`gcd2' not defined in Integer

**URL:** <https://www.ruby-forum.com/t/1-9-mathn-method-gcd2-not-defined-in-integer/57926>\
**Category:** Development\
**Created:** [April 16, 2006, 9:11am UTC](https://www.ruby-forum.com/t/1-9-mathn-method-gcd2-not-defined-in-integer/57926 "2006-04-16T09:11:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NARUSES\_Yui](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/258eb7/32.png) [@NARUSES\_Yui](https://www.ruby-forum.com/u/NARUSES_Yui)\
**Post date:** [April 16, 2006, 9:11am UTC](https://www.ruby-forum.com/t/1-9-mathn-method-gcd2-not-defined-in-integer/57926/1 "2006-04-16T09:11:24Z")

</div>

e$B@.@%$G$9!#e(B

Rationale$B$N5DO@$r8+$F$$$F6=L#$r;}$C$?$N$G!"e(B  
e$B$^$:$Oe(Bmathne$B$GM7$s$G$\_$h$&$H;W$C$?$N$G$9$,!"e(B  
e$B%m!\<%I;~$K%(%i!\<$,=P$^$9!#e(B

19e$B9TL$Ne(B remove\_method(:gcd2) e$B$,I,MW$J$$$h$&$G$9!#e(B  
e$B5U$K$I$3$+$GDj5A$7$?e(B Integer#gcd2 e$B$,!"e(B  
e$B\>C$($F$7$^$C$?$N$+$b$7$l$^$;$s$,!&!&!&!#e(B

diff -u -r1.12 mathn.rb  
— lib/mathn.rb 19 Sep 2005 16:02:55 -0000 1.12  
+++ lib/mathn.rb 16 Apr 2006 07:07:12 -0000  
@@ -16,7 +16,6 @@

class Integer

- remove\_method(:gcd2)  
def gcd2(other)  
min = self.abs  
max = other.abs

---

<div class="post-metadata">

**Author:** ![NARUSES\_Yui](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/258eb7/32.png) [@NARUSES\_Yui](https://www.ruby-forum.com/u/NARUSES_Yui)\
**Post date:** [April 20, 2006, 1:44am UTC](https://www.ruby-forum.com/t/1-9-mathn-method-gcd2-not-defined-in-integer/57926/2 "2006-04-20T01:44:00Z")

</div>

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:28570] 1.9/mathn: method `gcd2’ not defined  
in Integer”  
on Sun, 16 Apr 2006 16:11:00 +0900, “NARUSE, Yui”  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

|19e$B9TL$Ne(B remove\_method(:gcd2) e$B$,I,MW$J$$$h$&$G$9!#e(B  
|e$B5U$K$I$3$+$GDj5A$7$?e(B Integer#gcd2 e$B$,!"e(B  
|e$B\>C$($F$7$^$C$?$N$+$b$7$l$^$;$s$,!&!&!&!#e(B

e$B$$$(!“$3$l$OITMW$J$b$N$G$9!#:o=|$9$k$N$,@52r$G$7$g$&!#$”$j$,e(B  
e$B$H$&$4$6$$$^$7$?!#e(B
