Merge branch 'master' of github.com:mruby/mruby

This commit is contained in:
Yukihiro Matsumoto
2012-05-02 10:12:11 +09:00
2 changed files with 20 additions and 7 deletions
+19 -6
View File
@@ -1,8 +1,14 @@
#
# Integer
#
##
# Integer
#
# ISO 15.2.8
class Integer
# 15.2.8.3.15
##
# Calls the given block once for each Integer
# from +self+ downto +num+.
#
# ISO 15.2.8.3.15
def downto(num, &block)
raise TypeError, "expected Integer" unless num.kind_of? Integer
i = self
@@ -13,7 +19,10 @@ class Integer
self
end
# 15.2.8.3.22
##
# Calls the given block +self+ times.
#
# ISO 15.2.8.3.22
def times(&block)
i = 0
while(i < self)
@@ -23,7 +32,11 @@ class Integer
self
end
# 15.2.8.3.27
##
# Calls the given block once for each Integer
# from +self+ upto +num+.
#
# ISO 15.2.8.3.27
def upto(num, &block)
raise TypeError, "expected Integer" unless num.kind_of? Integer
i = self
+1 -1
View File
@@ -299,7 +299,7 @@ localjump_error(mrb_state *mrb, const char *kind)
#define SET_SYM_VALUE(r,v) {\
(r).tt = MRB_TT_SYMBOL;\
(r).value.i = (v);\
(r).value.sym = (v);\
}
#define SET_OBJ_VALUE(r,v) {\