Commit Graph

7320 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto fa76bbeb07 mruby-random: add reporting URL since we modified the source 2016-08-30 09:03:14 +09:00
Yukihiro "Matz" Matsumoto 22dc84f72a Fixed spell errors in test/t/lang.rb; ref #3199 2016-08-20 21:57:20 +09:00
Yukihiro "Matz" Matsumoto c313fdfed0 Merge pull request #3199 from miura1729/original
Add new test for optimize VM
2016-08-20 21:35:17 +09:00
Miura Hideki 1751d8fd3b Add new test for optimize VM 2016-08-20 20:30:37 +09:00
Yukihiro "Matz" Matsumoto ff3e4b91f2 Move Module#include and #prepend to class.c; ref #3197
To avoid VM nesting with mrb_funcall()
2016-08-20 00:03:30 +09:00
Yukihiro "Matz" Matsumoto b2fceae461 renamed class.rb and error.rb to ensure they are read first; ref #3197 2016-08-19 14:10:23 +09:00
Yukihiro "Matz" Matsumoto 67ad1ff11e Merge pull request #3198 from nobu/feature/lparen_arg-stmt
parse.y: lparen_arg statement
2016-08-19 12:52:40 +09:00
Nobuyoshi Nakada 73dd82e30a parse.y: lparen_arg statement
allow parenthesised statement as a method argument.
reported [Feature:12686] in bugs.ruby-lang.org fixed in CRuby 2.4.
2016-08-19 11:11:54 +09:00
Yukihiro "Matz" Matsumoto 0597f66b23 Merge pull request #3196 from mimaki/fix-negative-ord
Fix String#ord failure which return a negative value
2016-08-17 17:00:01 +09:00
Hiroshi Mimaki 861b0eed7b Fix String#ord failure which return a negative value 2016-08-17 15:29:59 +09:00
Yukihiro "Matz" Matsumoto ee40f9bbbd Merge pull request #3195 from franckverrot/master
Correct method name
2016-08-16 13:44:23 +09:00
Franck Verrot f6a2f67648 Correct method name 2016-08-15 20:49:32 -07:00
Yukihiro "Matz" Matsumoto 86821379fd Merge pull request #3194 from nobu/chained-rhs
parse.y: fix chained assignments
2016-08-13 14:06:35 +09:00
Nobuyoshi Nakada bdd7e2bc8c parse.y: fix chained assignments
fix syntax errors with chained assignment with op assign.
reported [Bug:12669] in bugs.ruby-lang.org fixed in CRuby 2.4.
2016-08-13 13:56:14 +09:00
Yukihiro "Matz" Matsumoto bee34fb9bd Merge pull request #3193 from nobu/rhs-rescue
parse.y: simplify 90e8ce5
2016-08-12 10:29:46 +09:00
Nobuyoshi Nakada a06940daa9 parse.y: simplify 90e8ce5
simplify tOP_ASGN rules by command_rhs and arg_rhs rules with
%prec.
2016-08-12 10:14:35 +09:00
Yukihiro "Matz" Matsumoto 90e8ce5c30 parse.y: rescue modifiers for OP_ASGN should protect rhs only
reported in [Bug:12402] in bugs.ruby-lang.org fixed in CRuby 2.4
2016-08-11 16:27:14 +09:00
Yukihiro "Matz" Matsumoto 7a7fac8412 removed ChangeLog that has not been updated for long time; ref #3190 2016-08-08 12:38:21 +09:00
Yukihiro "Matz" Matsumoto af4567bb41 update copyright notice and license description for mt19937ar.[ch]
despite the fact original authors agreed to distribute their work
under MIT license, it does not mean mt19937ar.[ch] became the work
of mruby developers. To clarify, we updated copyright and license
notice of the source files.
2016-08-08 12:38:21 +09:00
Yukihiro "Matz" Matsumoto 501e1ef260 Merge pull request #3189 from wrl/public-hash-values
make mrb_hash_values() a public API function
2016-08-03 02:26:04 +09:00
William Light e02a88e031 make mrb_hash_values() a public API function 2016-08-01 11:05:46 +02:00
Yukihiro "Matz" Matsumoto eb7422af58 Merge pull request #3188 from guoxiao/warning
intptr_t should be used instead of uint32_t to hold a pointer.
2016-07-31 14:37:39 +09:00
Guo Xiao 339005e1d5 intptr_t should be used instead of uint32_t to hold a pointer.
Fix warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
2016-07-31 12:53:39 +08:00
Yukihiro "Matz" Matsumoto 42fefef916 Merge pull request #3186 from rmalizia44/patch-2
Update mirb.c
2016-07-28 10:59:32 +09:00
Malizia R 1c7572bc6a Update mirb.c 2016-07-27 16:51:10 -03:00
Yukihiro "Matz" Matsumoto 2b4ed40fc9 Merge pull request #3185 from kou/string-reduce-needless-array
Reduce needless Array generation in some String methods
2016-07-27 14:03:52 +09:00
Kouhei Sutou 6bb0775d76 Reduce needless Array generation in some String methods
Here are some benchmarks:

each_char:

    # /tmp/each_char.rb
    a = "a" * 1000000
    a.each_char do |x|
    end

Without this change:

    % time bin/mruby /tmp/each_char.rb
    bin/mruby /tmp/each_char.rb  1.07s user 0.02s system 99% cpu 1.088 total

With this change:

    % time bin/mruby /tmp/each_char.rb
    bin/mruby /tmp/each_char.rb  0.52s user 0.01s system 99% cpu 0.530 total

2 times faster with this change.

codepoints:

    # /tmp/codepoints.rb
    a = "a" * 1000000
    a.codepoints do |x|
    end

Without this change:

    % time bin/mruby /tmp/codepoints.rb
    bin/mruby /tmp/codepoints.rb  1.16s user 0.05s system 99% cpu 1.216 total

With this change:

    % time bin/mruby /tmp/codepoints.rb
    bin/mruby /tmp/codepoints.rb  0.56s user 0.02s system 99% cpu 0.589 total
2016-07-27 13:58:07 +09:00
Yukihiro "Matz" Matsumoto 3757b16dab Merge pull request #3184 from ksss/each_char
Support to call without block to String#each_char
2016-07-27 02:32:04 +09:00
ksss bef63a4f91 Support to call without block to String#each_char 2016-07-26 18:46:23 +09:00
Yukihiro "Matz" Matsumoto 32ad74f4d1 Merge pull request #3182 from sdottaka/fix-broken-msvc-build
Fix broken msvc build
2016-07-26 00:13:53 +09:00
Yukihiro "Matz" Matsumoto e635dc2a47 Merge pull request #3181 from sdottaka/fix-crash-on-mrb_parser_free
Fix crash in mrb_parser_free() due to freed memory access
2016-07-26 00:12:54 +09:00
Yukihiro "Matz" Matsumoto 62a16673a6 Merge pull request #3183 from Mav7/mav7/docs
yard docs for string.h
2016-07-25 15:07:30 +09:00
Yukihiro "Matz" Matsumoto a66a1e92e7 Merge pull request #3179 from ksss/struct
Should not define to `Struct` class
2016-07-25 14:19:10 +09:00
Yukihiro "Matz" Matsumoto 34ac707ea3 OP_ASGN vsp may be negative
reported by https://gist.github.com/miura1729/53fbd8af889c289a79108e38635b2378
fix proposed by @miura1729 in
https://github.com/miura1729/mruby/commit/b1b7933f7aa950cfb747b06327a0d0340f3e4ff8
2016-07-25 11:34:55 +09:00
Yukihiro "Matz" Matsumoto 417092360d Fixed crash error when #initialize is redefined for Struct; fix #3177
refactored redundant functions; removed optimized accessors for safety
this fix also close #3178
2016-07-25 10:32:10 +09:00
Ralph Desir(Mav7) 189ad47346 yard docs for string.h 2016-07-23 02:47:32 -04:00
Takashi Sawanaka fb1c4b3ba7 Fix broken msvc build 2016-07-23 11:57:36 +09:00
Takashi Sawanaka 2eefbfed9d Fix crash in mrb_parser_free() due to freed memory access 2016-07-23 11:34:04 +09:00
ksss bf21063a72 Add regression test 2016-07-22 15:26:17 +09:00
ksss 1a8074accf Should not define to Struct class 2016-07-22 15:26:11 +09:00
Yukihiro "Matz" Matsumoto 97283faa16 Merge pull request #3176 from ksss/string-insert
String#insert should be destructive
2016-07-15 01:22:02 +09:00
ksss d83d9cd164 String#insert should be destructive 2016-07-14 21:33:15 +09:00
Yukihiro "Matz" Matsumoto 72b28f1ed6 Merge pull request #3174 from ksss/local-jump-error
Should raise LocalJumpError when no block given
2016-07-14 17:10:54 +09:00
ksss 9dc820590f Should raise LocalJumpError when no block given 2016-07-14 13:03:25 +09:00
Yukihiro "Matz" Matsumoto d4d807b774 relax string length limitation to 64KB; fix #2725 2016-07-13 03:22:15 +09:00
Yukihiro "Matz" Matsumoto 2e74a93112 Merge pull request #3171 from kjunichi/c-has-no-try
C doesn't have try-catch
2016-07-08 12:14:46 +09:00
Junichi Kajiwara f67631afb4 C doesn't have try-catch 2016-07-08 06:30:45 +09:00
Yukihiro "Matz" Matsumoto 0d9aa830aa Merge pull request #3169 from ksss/Wshift-negative-value
Fix warning shift-negative-value
2016-07-02 00:55:00 +09:00
ksss e3bc81e75e Fix warning shift-negative-value 2016-07-01 22:00:55 +09:00
Yukihiro "Matz" Matsumoto 3c406d54be Merge pull request #3166 from yyamano/fix-gc-profile
Fix compilation error with GC_PROFILE.
2016-06-30 14:32:53 +09:00