Commit Graph

3073 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 996417cabf integer range check was moved to mrb_flo_to_fixnum(); ref #3025 2015-11-19 22:49:50 +09:00
murase_syuka ef95dcd390 Bugfix nagative-number lshift() bit overflow 2015-11-18 21:37:17 +09:00
murase_syuka a4d5588101 Bugfix lshift() bit overflow; close #3023 2015-11-18 01:00:46 +09:00
cremno e2e23c66d2 add RUBY_ENGINE_VERSION
RUBY_ENGINE_VERSION is equivalent to MRUBY_VERSION. It would be a
standard way to get the interpreter version (without a case expression).

It's also already defined by CRuby 2.3, JRuby 9000, Opal, and Rubinius.
2015-11-17 00:13:31 +01:00
Yukihiro "Matz" Matsumoto 4440566b95 DISABLE_STDIO/ENABLE_DEBUG macros to rename; close #3014
changes:
 * rename DISABLE_STDIO -> MRB_DISABLE_STDIO
 * rename ENABLE_DEBUG -> MRB_ENABLE_DEBUG_HOOK
 * no more opposite macro definitions (e.g. ENABLE_STDIO, DISABLE_DEBUG).
 * rewrite above macro references throughout the code.
 * update documents
2015-11-17 07:30:34 +09:00
murase_syuka cd1a566002 fix comment 2015-11-16 22:27:42 +09:00
Yukihiro "Matz" Matsumoto d6e1762346 Merge pull request #3004 from cremno/remove-return
remove return
2015-11-08 21:36:54 +09:00
Yukihiro "Matz" Matsumoto d3b323cf2f PR #2521 did not work for singleton classes for non-class objects; fix #3003 2015-11-07 15:51:00 +09:00
cremno e18e2a44f0 remove return
The return type of the mrb_objspace_each_objects function is void.
So this return statement with an expression is unnecessary and
also violates a constraint. From C99 §6.8.6.4:
>A return statement with an expression shall not appear
>in a function whose return type is void.
2015-11-06 18:13:38 +01:00
Yukihiro "Matz" Matsumoto 8bad1954a4 mrb_get_args should consume argument even when type specifier with bang get nil; fix #3002 2015-10-28 09:36:48 +09:00
Yukihiro "Matz" Matsumoto 614927447a mrb_str_concat() may call VM resursively thus may reallocate VM stack; close #3000 2015-10-27 01:06:15 +09:00
Yukihiro "Matz" Matsumoto 727f2485c9 Merge pull request #2999 from sagmor/better-docs
More Docs
2015-10-22 07:10:16 +09:00
Yukihiro "Matz" Matsumoto e5fbf9dfa2 align codedump output for OP_JMP 2015-10-22 00:37:42 +09:00
Yukihiro "Matz" Matsumoto 73fa6486c6 align codedump output for OP_RETURN 2015-10-22 00:36:51 +09:00
furunkel 6b67590fda Merge branch 'master' of https://github.com/mruby/mruby into gc_cleanup 2015-10-21 11:17:58 +02:00
furunkel 0d8012f513 Merge upstream 2015-10-21 11:12:08 +02:00
Yukihiro "Matz" Matsumoto 68ba386213 Merge pull request #2879 from cremno/call-always-frexp-instead-of-frexpl
call always frexp() instead of frexpl()
2015-10-21 10:36:11 +09:00
Seba Gamboa 13b552538a Remove obvious warnings from docs 2015-10-20 12:48:31 -03:00
Seba Gamboa e871b77f41 Increasing docs coverage 2015-10-20 12:16:46 -03:00
furunkel 1c6b1d0155 Prefix mrb_gc_state enum members, make color defines private 2015-10-20 10:54:47 +02:00
Yukihiro "Matz" Matsumoto fc4f0b9be7 do not assert is_dead() during mark phase; close #2825 ref #2996 #2769 2015-10-20 17:06:54 +09:00
furunkel 2b39d87fe8 Remove gc_ prefix of mrb_gc fields 2015-10-19 23:00:07 +02:00
furunkel 2f8b0f66bc Move MRB_GC_ARENA_SIZE to gc.h and fix compiler warnings 2015-10-19 22:43:09 +02:00
furunkel 5c093ed22b Remove segregated value struct declaration 2015-10-19 22:34:47 +02:00
furunkel 3ab2f9371e Clean up GC code 2015-10-19 22:29:43 +02:00
Yukihiro "Matz" Matsumoto fafe86d364 Array#index to take block; fix #2968 close #2970 2015-10-01 22:35:06 +09:00
Yasuhiro Matsumoto d5f145076c chop with utf-8. fix #2967 2015-09-29 21:22:45 +09:00
takahashim 074c6e2678 fix String#inspect with MRB_UTF8_STRING
cf. #2963
2015-09-27 13:43:45 +09:00
Yukihiro "Matz" Matsumoto 524a038876 inspect prints valid UTF-8 character without escaping 2015-09-25 23:09:46 +09:00
Yukihiro "Matz" Matsumoto c069e5ff40 add boundary check to utf8len() to avoid oob memory access 2015-09-25 23:08:37 +09:00
Yukihiro "Matz" Matsumoto 798ec3aff4 UTF-8 string support in core
define MRB_UTF8_STRING (in mrbconf.h) to enable UTF-8 support.
2015-09-24 02:37:33 +09:00
Yukihiro "Matz" Matsumoto ad1087f5ed should initialize local variable prepended to false 2015-09-23 03:27:10 +09:00
Yukihiro "Matz" Matsumoto 6a06a3e48d String#rindex should no longer take integer argument 2015-09-23 01:06:26 +09:00
Yukihiro "Matz" Matsumoto 2cb6c27781 String#index should no longer take integer argument 2015-09-22 19:10:48 +09:00
Yukihiro "Matz" Matsumoto 73dc32c670 add new functions mrb_gc_register/unregister; close #1411
some routines need to refer mruby objects (e.g. callbacks), in that case
you have to protect your objects from garbage collection. the new functions
mrb_gc_register() keeps those objects from GC. you have to remove your
objects using mrb_gc_unregister() when your C routines use mruby objects
any longer, otherwise objects will leak.
2015-09-22 00:15:29 +09:00
Jun Hiroe ce6297aa04 Fix indents 2015-09-19 06:38:28 +09:00
Jun Hiroe dd1fa91a66 Replace 1 with TURE macro 2015-09-18 15:51:49 +09:00
Tatsuhiro Tsujikawa a085c04e37 Don't crash if NULL is passed to mrb_close
Sometimes it is very useful just return from mrb_close if NULL is
passed as mrb.  This is the same spirit of free(3), which just does
nothing if NULL is passed.
2015-09-12 12:11:10 +09:00
Yasuhiro Matsumoto 8277e950ee Support windows locale
Add mrb_utf8_from_locale, mrb_utf8_free, mrb_locale_from_utf8, mrb_locale_free. Just works for windows.
2015-09-11 11:12:03 +09:00
Kazuho Oku 8256d77c7f avoid unnecessary string duplications by checking the frozen flag 2015-09-10 22:50:01 +09:00
Kazuho Oku 44eb1492be freeze the hash key (fixes #2945) 2015-09-10 22:24:10 +09:00
Yukihiro "Matz" Matsumoto 2550edd570 remove origin member to implement prepend from struct RClass; ref #2885
instead origin is saved in ICLASS with MRB_FLAG_IS_ORIGIN set.
2015-09-05 02:01:02 +09:00
Yukihiro "Matz" Matsumoto 8bb7962eb8 Merge branch 'module-prepend' of https://github.com/polyfox/mruby into polyfox-module-prepend 2015-09-04 04:01:49 +09:00
Yukihiro "Matz" Matsumoto 7b5f8b0728 remove trailing spaces from bc9c47d5 2015-09-03 01:39:17 +09:00
Yukihiro "Matz" Matsumoto e35c3aff83 unsigned long may be smaller than mrb_int; use uint64_t instead; fix #2935 2015-09-03 00:14:37 +09:00
Yukihiro "Matz" Matsumoto 3a462fe468 Integer << and >> to use Float instead of raising RangeError 2015-09-02 23:41:51 +09:00
Yukihiro "Matz" Matsumoto 6ddd79fd0e ensure must not be called before rescue; fix #2933 2015-09-02 21:46:51 +09:00
Yukihiro "Matz" Matsumoto 14f0e4a4e4 update string.h.md; ref #2931 2015-09-02 15:09:50 +09:00
Jun Hiroe e9b4cb11cf Add a global const variable MRUBY_RELEASE_NO 2015-09-01 13:55:08 +09:00
Yukihiro "Matz" Matsumoto 1a45447b8b add String#freeze to the core 2015-08-27 17:54:30 +09:00