Commit Graph

2202 Commits

Author SHA1 Message Date
cubicdaiya 016d3b9394 fix off-by-one error in attrsym
The allocation size for null-terminated character is lacking.
In actual, it is no problem in most case
because codegen_palloc allocates more a memory size than required size.
2014-03-05 11:20:39 +09:00
cubicdaiya ebe4711df8 fix off-by-one error in String#rindex(fixnum)
null-terminated string should not be included in search targets.
2014-03-04 21:58:47 +09:00
cubicdaiya 019d15c3ee Use mrb_exc_new_str_lit widely 2014-03-04 02:45:53 +09:00
Yukihiro "Matz" Matsumoto 18f0fcb0c7 add new macros for MRB_STR_SHARED operations, based on 0f7aecf from @ksss; ref #1782 2014-03-04 01:33:58 +09:00
Yukihiro "Matz" Matsumoto 369c6c3649 Kernel#send does not use mrb_funcall anymore for most cases; ref #1680 2014-03-03 13:31:29 +09:00
Yukihiro "Matz" Matsumoto 9a92b40aaf rescue clause should understand splats; close #1786 2014-03-03 13:25:13 +09:00
Yukihiro "Matz" Matsumoto 7721463a35 add const to char* to pacify warnings for string litral to char* conversion 2014-03-02 00:59:12 +09:00
take_cheeze b98890a4b7 clear exc_catched before jumping to L_RAISE 2014-03-01 20:53:31 +09:00
take_cheeze 54f9ca36fd define __STDC_* macros in y.tab.cxx too 2014-03-01 20:05:31 +09:00
take_cheeze fad4b578e1 wrap scope with do {} while() 2014-03-01 20:05:31 +09:00
take_cheeze 86831d5465 move jmpbuf_id to generated file 2014-03-01 20:05:30 +09:00
take_cheeze 1985f1ace9 fix compile error of min/max macro 2014-03-01 20:05:29 +09:00
take_cheeze 78915f9601 support c++ exception 2014-03-01 20:05:29 +09:00
Yukihiro "Matz" Matsumoto 675fd3dc80 allow send method not to call mrb_funcall if calling method is implemented in Ruby; fix #1680 ref #1765 2014-03-01 18:13:10 +09:00
Yukihiro "Matz" Matsumoto 8e170ce915 exception in fiber should make resume to raise in parent fiber context; close #1765 2014-03-01 12:58:31 +09:00
Yukihiro "Matz" Matsumoto 5f93759158 Merge branch 'issues/comment_style' of https://github.com/cubicdaiya/mruby into cubicdaiya-issues/comment_style 2014-03-01 10:52:46 +09:00
Yukihiro "Matz" Matsumoto 78f2902c06 need to initialize flags for pooled strings; close #1768 2014-03-01 10:48:22 +09:00
Yukihiro "Matz" Matsumoto 5fb8fa5a81 add _FLAG to SET_SHARED macros; ref #1750 2014-03-01 10:26:21 +09:00
Yukihiro "Matz" Matsumoto fca90a43c7 Merge branch 'array-shared-macro' of https://github.com/ksss/mruby into ksss-array-shared-macro 2014-03-01 10:19:55 +09:00
cubicdaiya 67de10bfcb use C style comments instead of C++ style comments
According to CONTRIBUTING.md,

Don't use C++ style comments

 /* This is the prefered comment style */

Use C++ style comments only for temporary comment e.g. commenting out some code lines.
2014-03-01 03:31:45 +09:00
Yukihiro "Matz" Matsumoto 6bd3d88edd support break from fiber block; fix #1766 2014-02-28 18:43:35 +09:00
Yukihiro "Matz" Matsumoto 03fde35760 restore proc after restoring from fiber; ref #1766 2014-02-28 12:50:32 +09:00
cubicdaiya 8336072e86 fix SEGV bug for mrb_str_new_static
mrb_str_new_static causes seg-fault when 3rd argument is negative.
2014-02-28 02:07:09 +09:00
Yukihiro "Matz" Matsumoto 25822f2430 Merge pull request #1762 from cubicdaiya/issues/mrb_str_new_bug
fix SEGV bug for mrb_str_new
2014-02-28 01:44:09 +09:00
cubicdaiya 30fe3f5d4b fix SEGV bug for mrb_str_new
mrb_str_new causes seg-fault when 3rd argument is negative.
2014-02-28 01:30:09 +09:00
Yukihiro "Matz" Matsumoto 90c54d1ead remove break altogether in ci loop 2014-02-28 01:25:50 +09:00
Yukihiro "Matz" Matsumoto 9a9548eb0e Merge pull request #1760 from cubicdaiya/issues/make_mrb_str_dump_a_bit_faster
make mrb_str_dump a bit faster
2014-02-28 00:51:54 +09:00
Yukihiro "Matz" Matsumoto 30ac4e5596 Merge pull request #1758 from ksss/array-out-while
move check condition to outside in while block
2014-02-28 00:51:33 +09:00
cubicdaiya a238c9c1c3 make mrb_str_dump a bit faster 2014-02-28 00:20:36 +09:00
ksss 88f3e5b294 move check condition to outside in while block 2014-02-27 23:54:36 +09:00
cubicdaiya bd0244d067 use mrb_str_cat_lit() intead of mrb_str_cat 2014-02-27 22:42:25 +09:00
Yukihiro "Matz" Matsumoto d1526b0409 should not continue loop when ci = NULL 2014-02-27 19:00:37 +09:00
Yukihiro "Matz" Matsumoto b31a90614d boot_defclass: super may be NULL 2014-02-27 08:21:39 +09:00
Yukihiro "Matz" Matsumoto 5b8229715d revert 38e9ce21 and API changed; mrb_get_backtrace() -> renamed to mrb_exc_backtrace since this is a backtrace method implementation of Exception; mrb_get_backtrace_at() -> removed; mrb_get_backtrace() -> added to get backtrace in array (like caller) 2014-02-27 04:34:30 +09:00
Yukihiro "Matz" Matsumoto 0c1c4416e7 avoid recursion when method_missing happened in inspect; fix #1746 2014-02-27 04:23:57 +09:00
Yukihiro "Matz" Matsumoto d264e1addd fix indent 2014-02-27 03:50:59 +09:00
Yukihiro "Matz" Matsumoto 38e9ce21f8 add new function mrb_get_backtrace_at() to get backtrace at ci and pc 2014-02-27 03:45:52 +09:00
ksss f1043ab85c add macro ARY_UNSET_SHARED 2014-02-27 00:11:40 +09:00
ksss 2f090879a5 add macro ARY_SET_SHARED 2014-02-27 00:10:42 +09:00
cubicdaiya 4c283714f6 use mrb_str_new_lit instead of mrb_str_new for C string literal 2014-02-26 22:34:12 +09:00
Yukihiro "Matz" Matsumoto cc39213856 Merge pull request #1748 from cubicdaiya/issues/optim_get_valid_iv_sym
fix bug for get_valid_iv_sym
2014-02-26 21:59:01 +09:00
Yukihiro "Matz" Matsumoto 8c949eeef0 Merge pull request #1747 from cubicdaiya/issues/use_mrb_intern_lit
use mrb_intern_lit instead of mrb_intern_cstr for C string literals
2014-02-26 21:56:59 +09:00
ksss 3e4e90a708 add macro ARY_SHARED_P 2014-02-26 21:40:36 +09:00
cubicdaiya d316115748 fix bug for get_valid_iv_sym
When sub-string is used in the following way, it does not work well.

o = Object.new
o.instance_variable_set(:@a, 1)
o.instance_variable_defined?("@abc"[0,2]) #=> false (this should be true)
2014-02-26 17:26:40 +09:00
cubicdaiya 6db2e080f0 use mrb_intern_lit instead of mrb_intern_cstr for C string literals 2014-02-26 13:48:11 +09:00
cubicdaiya 94c5a5ee73 use mrb_str_new_lit instead of mrb_str_new for C string literals 2014-02-26 02:23:50 +09:00
Yukihiro "Matz" Matsumoto d747ea72c4 resolve conflict 2014-02-26 00:06:58 +09:00
Yukihiro "Matz" Matsumoto 05d3b9de54 clarify fallthrough in the switch statement 2014-02-25 10:48:10 +09:00
Yukihiro "Matz" Matsumoto ebd976be84 initialize sname before interning 2014-02-25 10:43:16 +09:00
Yukihiro "Matz" Matsumoto c636386953 avoid accessing uninitialized string; ref ac936fc 2014-02-25 00:47:02 +09:00