summaryrefslogtreecommitdiffhomepage
path: root/mrblib/kernel.rb
diff options
context:
space:
mode:
authorDaniel Bovensiepen <[email protected]>2012-05-06 18:15:38 +0800
committerDaniel Bovensiepen <[email protected]>2012-05-06 18:15:38 +0800
commit55f143d4e39545e5a8520f51679364606b2fbef0 (patch)
treeb84facc9c1efb2793d2559685ea5650a47356033 /mrblib/kernel.rb
parent8f4c1af9e4ca995d891c1f1b52113e90fe213ba5 (diff)
downloadmruby-55f143d4e39545e5a8520f51679364606b2fbef0.tar.gz
mruby-55f143d4e39545e5a8520f51679364606b2fbef0.zip
Add documentation to Kernel
Diffstat (limited to 'mrblib/kernel.rb')
-rw-r--r--mrblib/kernel.rb37
1 files changed, 30 insertions, 7 deletions
diff --git a/mrblib/kernel.rb b/mrblib/kernel.rb
index c09755d6c..fd4c86c38 100644
--- a/mrblib/kernel.rb
+++ b/mrblib/kernel.rb
@@ -1,21 +1,33 @@
+##
+# Kernel
#
-# Kernel
-#
+# ISO 15.3.1
module Kernel
- # 15.3.1.2.6
+
+ ##
+ # Takes the given block, create a lambda
+ # out of it and +call+ it.
+ #
+ # ISO 15.3.1.2.6
def self.lambda(&block)
### *** TODO *** ###
block # dummy
end
- # 15.3.1.2.8
+ ##
+ # Calls the given block repetitively.
+ #
+ # ISO 15.3.1.2.8
def self.loop #(&block)
while(true)
yield
end
end
- # 15.3.1.3.4
+ ##
+ # Alias for +send+.
+ #
+ # ISO 15.3.1.3.4
def __send__(symbol, *args, &block)
### *** TODO *** ###
end
@@ -25,20 +37,31 @@ module Kernel
### *** TODO *** ###
end
+ ##
+ # Alias for Kernel.lambda.
+ #
# 15.3.1.3.27
def lambda(&block)
### *** TODO *** ###
block # dummy
end
- # 15.3.1.3.29
+ ##
+ # Alias for Kernel.loop.
+ #
+ # ISO 15.3.1.3.29
def loop #(&block)
while(true)
yield
end
end
- # 15.3.1.3.44
+ ##
+ # Invoke the method with the name +symbol+ on
+ # the receiver and pass +args+ and the given
+ # block.
+ #
+ # ISO 15.3.1.3.44
def send(symbol, *args, &block)
### *** TODO *** ###
end