@@ -45,6 +45,8 @@ The algorithm is a simple way to find the *greatest common divisor* (GCD) of two
45
45
[ import:3-8, lang="scala"] ( code/scala/euclidean.scala )
46
46
{% sample lang="racket" %}
47
47
[ import:3-14, lang="lisp"] ( code/racket/euclidean_algorithm.rkt )
48
+ {% sample lang="ruby" %}
49
+ [ import:8-19, lang="ruby"] ( code/ruby/euclidean.rb )
48
50
{% sample lang="st" %}
49
51
[ import:1-13, lang="smalltalk"] ( code/smalltalk/euclid.st )
50
52
{% endmethod %}
@@ -98,6 +100,8 @@ Modern implementations, though, often use the modulus operator (%) like so
98
100
[ import:10-14, lang="scala"] ( code/scala/euclidean.scala )
99
101
{% sample lang="racket" %}
100
102
[ import:16-24, lang="lisp"] ( code/racket/euclidean_algorithm.rkt )
103
+ {% sample lang="ruby" %}
104
+ [ import:1-6, lang="ruby"] ( code/ruby/euclidean.rb )
101
105
{% sample lang="st" %}
102
106
[ import:15-25, lang="smalltalk"] ( code/smalltalk/euclid.st )
103
107
{% endmethod %}
@@ -156,6 +160,8 @@ The Euclidean Algorithm is truly fundamental to many other algorithms throughout
156
160
[ import, lang="scala"] ( code/scala/euclidean.scala )
157
161
{% sample lang="racket" %}
158
162
[ import, lang="lisp"] ( code/racket/euclidean_algorithm.rkt )
163
+ {% sample lang="ruby" %}
164
+ [ import, lang="ruby"] ( code/ruby/euclidean.rb )
159
165
{% sample lang="st" %}
160
166
[ import, lang="smalltalk"] ( code/smalltalk/euclid.st )
161
167
{% endmethod %}
0 commit comments