1. 17 Apr, 2015 3 commits
  2. 02 Apr, 2015 3 commits
  3. 31 Mar, 2015 1 commit
  4. 30 Mar, 2015 2 commits
    • cremno's avatar
      remove unnecessary <inttypes.h> inclusion · 18fdf7e0
      cremno authored
      The format specifier macros were needed to portably print a mrb_int,
      because mrb_raisef() originally called vsnprintf(). It doesn't anymore
      since 18b2683b and the mrb_int format
      specifier macros are already gone.
      18fdf7e0
    • cremno's avatar
      MSVC 2015 implements inline keyword · 6424569a
      cremno authored
      Apparently the C compiler of Visual Studio 2015 CTP6 finally implements
      inline as inline and not only as _inline and __inline.
      6424569a
  5. 23 Mar, 2015 2 commits
  6. 22 Mar, 2015 2 commits
    • cremno's avatar
      refactor write_pool_block() · 7985f75d
      cremno authored
      No need to write the same assertion in each case (except the default
      one). Instead we can assert after the switch statement.
      7985f75d
    • cremno's avatar
      call C11's timespec_get() · c47cc0c3
      cremno authored
      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).
      c47cc0c3
  7. 21 Mar, 2015 2 commits
  8. 19 Mar, 2015 2 commits
  9. 16 Mar, 2015 3 commits
  10. 05 Mar, 2015 2 commits
  11. 28 Feb, 2015 2 commits
  12. 27 Feb, 2015 3 commits
  13. 26 Feb, 2015 2 commits
  14. 24 Feb, 2015 5 commits
  15. 23 Feb, 2015 2 commits
    • Kouhei Sutou's avatar
      Fix a bug that if and no return value case can't return true clause value · 584d6de3
      Kouhei Sutou authored
      Here is a script that reproduce this problem:
      
           x = if true
                 1
               else
                 case 2
                 when 3
                 end
                 4
               end
           p x # => nil # 1 is expected
      584d6de3
    • Go Saito's avatar
      fix pointer dereference after realloc · 42d23084
      Go Saito authored
      In src/vm.c: mrb_funcall_with_block
      stack_extend may realloc mrb->c->stbase, if argv points on mruby's stack,
      then it points invalid address after stack_extend.
      
      e.g. src/class.c: mrb_instance_new
      
      This code:
      
      ```ruby
      class A
        def initialize(a0,a1,a2,a3,a4)
          a0.is_a? Array
        end
      end
      
      def f(a0,a1,a2,a3,a4)
        A.new(a0,a1,a2,a3,a4)
        f(a0,a1,a2,a3,a4)
      end
      
      f(0,1,2,3,4)
      ```
      
      is expected to get exception
      ```
      stack level too deep. (limit=(0x40000 - 128)) (SystemStackError)
      ```
      
      but get segfault.
      Signed-off-by: default avatarGo Saito <gos@iij.ad.jp>
      42d23084
  16. 19 Feb, 2015 3 commits
  17. 16 Feb, 2015 1 commit