In Files

  • mrbgems/mruby-print/mrblib/print.rb
  • mrblib/kernel.rb
  • mrblib/print.rb

Kernel

Kernel

ISO 15.3.1

Kernel

ISO 15.3.1

Kernel

ISO 15.3.1

Public Class Methods

`(s) click to toggle source

15.3.1.2.1

 
               # File mrblib/kernel.rb, line 8
def self.`(s)
  raise NotImplementedError.new("` not implemented")
end
            

Public Instance Methods

`(s) click to toggle source

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

            
p(*args) click to toggle source

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
            
printf(*args) click to toggle source
 
               # File mrbgems/mruby-print/mrblib/print.rb, line 52
def printf(*args)
  raise NotImplementedError.new('printf not available')
end
            
puts(*args) click to toggle source

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
            
sprintf(*args) click to toggle source
 
               # File mrbgems/mruby-print/mrblib/print.rb, line 55
def sprintf(*args)
  raise NotImplementedError.new('sprintf not available')
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.

blog comments powered by Disqus