Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Mar 23, 2015
  1. @tsahara-iij
  2. @matz

    Merge pull request #2750 from cremno/call-c11-timespec_get

    matz authored
    mruby-time: call ISO C11's timespec_get() if available
  3. @matz

    Merge pull request #2751 from cremno/refactor-write_pool_block

    matz authored
    refactor write_pool_block()
Commits on Mar 22, 2015
  1. @cremno

    refactor write_pool_block()

    cremno authored
    No need to write the same assertion in each case (except the default
    one). Instead we can assert after the switch statement.
  2. @cremno

    call C11's timespec_get()

    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).
Commits on Mar 21, 2015
  1. @tsahara-iij
  2. @matz
  3. @matz
Commits on Mar 19, 2015
  1. @tsahara-iij
  2. @matz

    Merge pull request #2747 from jbreeden/vcpp_exceptions

    matz authored
    Fix exceptions for visualcpp
  3. @jbreeden

    Fix exceptions for visualcpp

    jbreeden authored
Commits on Mar 16, 2015
  1. @tsahara-iij
  2. @matz

    Merge pull request #2746 from tarosay/tarosa

    matz authored
    I modified the undefined frexpl in cygwin of make
  3. @tarosay
  4. @tarosay
Commits on Mar 5, 2015
  1. @tsahara-iij
  2. @matz

    Merge pull request #2740 from govm/stack_extend-in-mrb_f_send

    matz authored
    Fix #2739 stack_extend in mrb_f_send
  3. @govm

    stack_extend in mrb_f_send

    govm authored
    mrb_f_send needs stack_extend like OP_SEND
    
    Signed-off-by: Go Saito <gos@iij.ad.jp>
Commits on Feb 28, 2015
  1. @tsahara-iij
  2. @matz

    Merge pull request #2738 from kou/use-ptrdiff-t

    matz authored
    Use ptrdiff_t to suppress signedness warning
  3. @kou

    Use ptrdiff_t to suppress signedness warning

    kou authored
    3df3216 says so but there is no warning
    with GCC 4.9 on my Debian GNU/Linux environment.
Commits on Feb 27, 2015
  1. @tsahara-iij
  2. @matz

    Merge pull request #2736 from cremno/delete-prototypes-of-undefined-f…

    matz authored
    …unctions
    
    delete prototypes of undefined functions
  3. @matz
  4. @matz
Commits on Feb 26, 2015
  1. @tsahara-iij
  2. @cremno
  3. @matz

    Merge pull request #2732 from kou/fix-a-crash-bug-on-raise-after-realloc

    matz authored
    Fix a crash bug on raising after realloc
Commits on Feb 24, 2015
  1. @tsahara-iij
  2. @kou

    Fix a crash bug on raising after realloc

    kou authored
    The following program reproduces this problem:
    
        #include <mruby.h>
    
        static mrb_value
        recursive(mrb_state *mrb, mrb_value self)
        {
          mrb_int n;
    
          mrb_get_args(mrb, "i", &n);
    
          if (n == 0) {
            mrb_raise(mrb, E_RUNTIME_ERROR, "XXX");
          } else {
            mrb_funcall(mrb, self, "recursive", 1, mrb_fixnum_value(n - 1));
          }
    
          return self;
        }
    
        int
        main(void)
        {
          mrb_state *mrb;
    
          mrb = mrb_open();
    
          mrb_define_method(mrb, mrb->kernel_module, "recursive", recursive,
                            MRB_ARGS_REQ(1));
          mrb_funcall(mrb, mrb_top_self(mrb), "recursive", 1, mrb_fixnum_value(30));
    
          mrb_close(mrb);
        }
    
    Recursive method call isn't required. It's just for expanding call info
    stack.
    
    If mrb_realloc() is called in cipush(), cibase address is changed. So,
    we shouldn't compare ci before mrb_realloc() and cibase after
    mrb_realloc(). It accesses unknown address and causes crash.
  3. @matz

    Merge pull request #2730 from kou/fix-no-expression-case

    matz authored
    Fix a bug that no expression case doesn't return valid value
  4. @kou

    Fix a bug that no expression case doesn't return valid value

    kou authored
    Here is a script that reproduces this problem:
    
         x = case
             when true; 1
             end
         p x # => main # 1 is expected
  5. @matz

    Merge pull request #2729 from kou/fix-if-and-no-value-returned-case

    matz authored
    Fix a bug that if and no return value case can't return true clause value
  6. @matz

    Merge pull request #2728 from govm/fix-dereference-invalid-argv

    matz authored
    fix pointer dereference after realloc
Commits on Feb 23, 2015
  1. @kou

    Fix a bug that if and no return value case can't return true clause v…

    kou authored
    …alue
    
    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
Something went wrong with that request. Please try again.