Skip to content

Tags: iij/mruby

Tags

1.0-iij21

Toggle 1.0-iij21's commit message
fix build on VS2012

1.0-iij20

Toggle 1.0-iij20's commit message
should ignore block to next, break, etc. fix mruby#3039

1.0-iij19

Toggle 1.0-iij19's commit message
unsigned long may be smaller than mrb_int; use uint64_t instead; fix m…

…ruby#2935

1.0-iij18

Toggle 1.0-iij18's commit message
FIXABLE() may work wrong on MRB_INT64; fix mruby#2909

1.0-iij17

Toggle 1.0-iij17's commit message
Avoid a narrowing cast in flo_round under MRB_INT64.

1.0-iij16

Toggle 1.0-iij16's commit message
singleton_class should not be duped; fix mruby#2815

Conflicts:
	src/kernel.c

1.0-iij15

Toggle 1.0-iij15's commit message
execute ensure clause only when skipping call frame; fix mruby#2726

1.0-iij14

Toggle 1.0-iij14's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
call C11's timespec_get()

gettimeofday() is an obsolescent POSIX function which may be removed in
a future version. POSIX recommends using clock_gettime() (also POSIX)
instead, but it isn't available on OS X or Windows (at least with MSVC
and older MinGW versions).

Whereas timespec_get() is part of ISO C11 and mruby uses some small
other C11 features too. It isn't universally available yet either, but
it might be in the future. And Visual C++ 2015 implements it! Since
mruby strives for ISO C and not POSIX compatibility, I think it's a
reasonable choice.

TIME_UTC is used instead of __STDC_VERSION__, because if TIME_UTC is
defined, then most likely timespec_get() is too. This isn't true in case
of  __STDC_VERSION__ (see MSVC).

1.0-iij13

Toggle 1.0-iij13's commit message
change size_t to ptrdiff_t to silence signedness warnings; mruby#2732

Conflicts:
	src/vm.c

1.0-iij12

Toggle 1.0-iij12's commit message
Fix ensure with yield context on break and return

How to reproduce:

    class A
      def x
        yield
      ensure
        y
      end

      def y
      end
    end

    # Work
    A.new.x do
    end

    # Not work
    # trace:
    # 	[2] /tmp/a.rb:5:in A.x
    # 	[0] /tmp/a.rb:15
    # /tmp/a.rb:5: undefined method 'y' for main (NoMethodError)
    A.new.x do
      break
    end

    # trace:
    # 	[2] /tmp/a.rb:5:in A.call
    # 	[0] /tmp/a.rb:19
    # /tmp/a.rb:5: undefined method 'y' for main (NoMethodError)
    lambda do
      A.new.x do
        return
      end
    end.call

`self` in ensure is broken when yield and break/return are used.

Conflicts:
	src/vm.c