git://git.eng.unimelb.edu.au
/
ruby_koans.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d92f323
)
Updated koans directory from source.
author
Jim Weirich
<jim.weirich@gmail.com>
Sun, 4 Dec 2011 07:40:08 +0000
(
02:40
-0500)
committer
Jim Weirich
<jim.weirich@gmail.com>
Sun, 4 Dec 2011 07:40:08 +0000
(
02:40
-0500)
koans/edgecase.rb
patch
|
blob
|
history
diff --git
a/koans/edgecase.rb
b/koans/edgecase.rb
index
0707687
..
1443807
100644
(file)
--- a/
koans/edgecase.rb
+++ b/
koans/edgecase.rb
@@
-24,6
+24,11
@@
def in_ruby_version(*versions)
yield if versions.any? { |v| ruby_version?(v) }
end
yield if versions.any? { |v| ruby_version?(v) }
end
+in_ruby_version("1.8") do
+ class KeyError < StandardError
+ end
+end
+
# Standard, generic replacement value.
# If value19 is given, it is used in place of value for Ruby 1.9.
def __(value="FILL ME IN", value19=:mu)
# Standard, generic replacement value.
# If value19 is given, it is used in place of value for Ruby 1.9.
def __(value="FILL ME IN", value19=:mu)
@@
-44,8
+49,12
@@
def _n_(value=999999, value19=:mu)
end
# Error object replacement value.
end
# Error object replacement value.
-def ___(value=FillMeInError)
- value
+def ___(value=FillMeInError, value19=:mu)
+ if RUBY_VERSION < "1.9"
+ value
+ else
+ (value19 == :mu) ? value : value19
+ end
end
# Method name replacement.
end
# Method name replacement.