Updated koans directory from source.

This commit is contained in:
Jim Weirich
2011-12-04 02:40:08 -05:00
parent d92f3234c7
commit a3fcc3904a

View File

@@ -24,6 +24,11 @@ def in_ruby_version(*versions)
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)
@@ -44,8 +49,12 @@ def _n_(value=999999, value19=:mu)
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.