Commit e841135c authored by Daniel Bovensiepen's avatar Daniel Bovensiepen

raise NotImplementedError in case of sprintf is missing

parent cf8b6ec8
......@@ -48,12 +48,14 @@ module Kernel
args[0]
end
if Kernel.respond_to?(:sprintf)
##
# Invoke method +sprintf+ and pass +*args+ to it.
# Pass return value to *print* of STDOUT.
def printf(*args)
##
# Invoke method +sprintf+ and pass +*args+ to it.
# Pass return value to *print* of STDOUT.
def printf(*args)
if Kernel.respond_to?(:sprintf)
__printstr__(sprintf(*args))
else
raise NotImplementedError.new('sprintf not available')
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment