15.3.1.3.5
# File mrblib/kernel.rb, line 13
def `(s)
Kernel.%x(s)
end
##
# Calls the given block repetitively.
#
# ISO 15.3.1.2.8
def self.loop #(&block)
while(true)
yield
end
end
# 15.3.1.2.3
def self.eval(s)
raise NotImplementedError.new("eval not implemented")
end
# 15.3.1.3.12
def eval(s)
Kernel.eval(s)
end
##
# Alias for +Kernel.loop+.
#
# ISO 15.3.1.3.29
def loop #(&block)
while(true)
yield
end
end
end
Print human readable object description
ISO 15.3.1.3.34
# File mrbgems/mruby-print/mrblib/print.rb, line 40
def p(*args)
i = 0
len = args.size
while i < len
__printstr__ args[i].inspect
__printstr__ "\n"
i += 1
end
args[0]
end
Invoke method print on STDOUT and passing +*args+
ISO 15.3.1.2.10
# File mrbgems/mruby-print/mrblib/print.rb, line 10
def print(*args)
i = 0
len = args.size
while i < len
__printstr__ args[i].to_s
i += 1
end
end
# File mrbgems/mruby-print/mrblib/print.rb, line 52
def printf(*args)
raise NotImplementedError.new('printf not available')
end
Invoke method puts on STDOUT and passing
+args+
ISO 15.3.1.2.11
# File mrbgems/mruby-print/mrblib/print.rb, line 23
def puts(*args)
i = 0
len = args.size
while i < len
s = args[i].to_s
__printstr__ s
__printstr__ "\n" if (s[-1] != "\n")
i += 1
end
__printstr__ "\n" if len == 0
nil
end
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please see Improve the docs, or visit Documenting-ruby.org.