Yukihiro "Matz" Matsumoto
ff49cf95fc
Merge pull request #2869 from cremno/refactor-print.c
...
src/print.c: rewrite printstr() to get rid of code duplication
2015-07-01 08:47:41 +09:00
Yukihiro "Matz" Matsumoto
18c82d5359
Merge pull request #2868 from sgnr/avoid-narrowing-cast-in-flo-round
...
Avoid a narrowing cast in flo_round under MRB_INT64.
2015-07-01 08:43:49 +09:00
Simon Génier
d6865a9cc7
Avoid a narrowing cast in flo_round under MRB_INT64.
2015-06-29 20:19:19 -04:00
Yukihiro "Matz" Matsumoto
1c2fc94c20
Merge pull request #2867 from kou/proc-fix-gc-crash
...
Fix a crash bug when GC is ran while creating a proc with env
2015-06-29 18:33:46 +09:00
Kouhei Sutou
52db92de53
Fix a crash bug when GC is ran while creating a proc with env
...
mrb_proc_new_cfunc_with_env() allocates RProc with RProc::env as NULL
then allocates REnv and sets it to RProc::env of the allocated RProc. If
incremental GC is ran before "allocates REnv and sets it to RProc::env
of the allocated RProc", the allocated RProc's GC status is
"marked" (Black) and the allocated REnv's GC status is
"unmarked" (White). The next incremental GC sweeps the allocated REnv
without re-marking the allocated RProc. Because the RProc is Black and
the REnv is White.
We need to implement write barrier for the case.
We can force to cause the above situation by the following patch:
diff --git a/src/proc.c b/src/proc.c
index f98998f..4f4e25c 100644
--- a/src/proc.c
+++ b/src/proc.c
@@ -92,6 +92,7 @@ mrb_proc_new_cfunc_with_env(mrb_state *mrb, mrb_func_t func, mrb_int argc, const
struct REnv *e;
int i;
+ mrb_incremental_gc(mrb);
p->env = e = env_new(mrb, argc);
MRB_ENV_UNSHARE_STACK(e);
e->stack = (mrb_value*)mrb_malloc(mrb, sizeof(mrb_value) * argc);
With this patch, "rake test" causes segmentation fault.
2015-06-29 14:39:30 +09:00
Yukihiro "Matz" Matsumoto
b0ec992d41
Merge pull request #2866 from jurriaan/fix-crash
...
Fix segfault found using afl-fuzz
2015-06-29 10:27:09 +09:00
Yukihiro "Matz" Matsumoto
96d6e45acd
Merge pull request #2863 from suzukaze/fix-typo
...
Fix typo; Replace extensional with extended
2015-06-29 10:22:28 +09:00
Yukihiro "Matz" Matsumoto
a41a649e83
Merge pull request #2862 from scalone/recursive_clone
...
Add —-recursive option to automatically update submodules from git mgems
2015-06-29 10:21:07 +09:00
Yukihiro "Matz" Matsumoto
d671f57305
Merge pull request #2861 from scalone/quotes_use
...
Fix quotes use during load special path gem of gem.
2015-06-29 10:17:30 +09:00
Yukihiro "Matz" Matsumoto
0e0773c683
Merge pull request #2860 from franckverrot/move-doc
...
Respect the directory structure of `include`
2015-06-29 10:12:03 +09:00
Jurriaan Pruis
a41f5eb23f
Fix segfault found using afl-fuzz
2015-06-28 13:46:23 +02:00
Jun Hiroe
4e4929bc72
Rename extended xxxx class or module to xxxx class or module extension
2015-06-28 11:18:52 +09:00
Jun Hiroe
c69d1201e1
Fix typo; Replace extensional with extended
2015-06-28 00:05:58 +09:00
Thiago Scalone
fa4b88b893
Fix quotes use during load special path gem of gem.
2015-06-26 14:35:34 -03:00
Thiago Scalone
449ec101f6
Add —-recursive option to automatically update submodules from git mgems.
2015-06-26 14:22:09 -03:00
Franck Verrot
427cc64de0
Respect the directory structure of include
...
As mentioned in the README, two files have been put under the `mruby`
directory.
2015-06-26 14:37:57 +02:00
Yukihiro "Matz" Matsumoto
f39a31a623
Merge pull request #2859 from mattn/fix-root
...
add_dependency doesn't work
2015-06-25 09:57:23 +09:00
Yukihiro "Matz" Matsumoto
db7e02cd41
Merge pull request #2858 from franckverrot/remove-unnecessary-backticks
...
Remove unnecessary backticks
2015-06-25 09:55:25 +09:00
mattn
a15e99d2b6
add_dependency doesn't work
2015-06-25 00:19:04 +09:00
Franck Verrot
2588507285
Remove unnecessary backticks.
...
Dr Markus Kuhn published in 1999 an article [1] explaining in details
why we shouldn't use the ASCII grave accent (0x60) as a left quotation.
Backticks have been used most notably to produce nice-looking LaTeX
documents but it doesn't seem to be an issue on modern platforms and
for the oldest ones, there are workarounds as mentioned by Dr Kuhn.
[1]: https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
2015-06-24 13:07:07 +02:00
Yukihiro "Matz" Matsumoto
5161909cd7
Merge branch 'furunkel-deprecated'
2015-06-24 10:05:15 +09:00
Yukihiro "Matz" Matsumoto
e88e7dc8db
remove deprecated.h
2015-06-24 10:05:05 +09:00
Yukihiro "Matz" Matsumoto
36e010cd75
Merge branch 'deprecated' of https://github.com/furunkel/mruby into furunkel-deprecated
2015-06-24 10:03:44 +09:00
Yukihiro "Matz" Matsumoto
fb5af4de2c
Merge pull request #2857 from hone/cross_compile_targets
...
provide targets for building native extensions during CrossBuild
2015-06-24 09:31:22 +09:00
Yukihiro "Matz" Matsumoto
acb504fa0d
Merge pull request #2853 from jbreeden/alloc_doc
...
Alloc doc
2015-06-24 09:27:26 +09:00
Terence Lee
0006a8cd4a
add host_target/build_target options for CrossBuild'ng native extensions
2015-06-23 13:05:35 -04:00
cremno
6ed64e2367
rewrite printstr() to get rid of code duplication
2015-06-23 12:44:28 +02:00
furunkel
e90f0d51a3
Move deprecated macros and functions to dedicated header file
2015-06-23 10:35:02 +02:00
Jared Breeden
18337266f8
Merge branch 'master' of http://github.com/mruby/mruby into alloc_doc
2015-06-22 23:20:24 -07:00
Jared Breeden
9781580c71
Fixes #912
2015-06-22 23:19:58 -07:00
Yukihiro "Matz" Matsumoto
1001be2e99
Merge pull request #2852 from jbreeden/mrb_string_value_cstr_patch
...
Mrb string value cstr patch
2015-06-23 14:54:13 +09:00
Yukihiro "Matz" Matsumoto
0b720ffa61
Merge pull request #2851 from hone/mruby_compiler
...
Need mruby-compiler to build mruby-bin-mruby and mruby-bin-mirb for
2015-06-23 14:53:12 +09:00
Yukihiro "Matz" Matsumoto
29a7226d8e
Merge pull request #2849 from cremno/proc-curry-should-preserve-lambdas
...
Proc#curry should preserve lambdas
2015-06-23 14:51:36 +09:00
Yukihiro "Matz" Matsumoto
66a352c836
Merge branch 'cremno-fix-strict-proc-arity'
2015-06-23 14:43:12 +09:00
Yukihiro "Matz" Matsumoto
937b5b5462
fix Proc#curry test failure; ref #2848
2015-06-23 14:42:58 +09:00
Jared Breeden
9ad632559e
*Correctly* removing extra mrb_str_to_str call
2015-06-22 20:49:09 -07:00
Jared Breeden
cfcca2a727
Reverting overzealous changes
2015-06-22 19:49:12 -07:00
Jared Breeden
264a059aef
Removing unneeded bad_checks for verified strings
2015-06-22 19:15:52 -07:00
Jared Breeden
9553e20d34
Removing redundant mrb_str_to_str call
2015-06-22 19:07:25 -07:00
Jared Breeden
338ca305ae
Calling mrb_str_to_str in mrb_string_value_cstr. Fixes #2847
2015-06-22 18:37:14 -07:00
Terence Lee
7e087d7191
Need mruby-compiler to build mruby-bin-mruby and mruby-bin-mirb for
...
cross compiles
2015-06-22 13:01:15 -04:00
cremno
69b4c1648a
Proc#curry should preserve lambdas
2015-06-22 16:35:54 +02:00
cremno
f0eaf9eaf5
fix arity of lambdas with optional arguments
...
From the CRuby 2.2.2 Proc#arity documentation:
If the block has optional arguments, returns -n-1, where n is the number
of mandatory arguments, with the exception for blocks that are not
lambdas and have only a finite number of optional arguments; in this
latter case, returns n.
2015-06-22 13:34:24 +02:00
Yukihiro "Matz" Matsumoto
e344c6ab6d
[ci skip] replace "ignored" by "omitted"; ref #2846
2015-06-22 10:09:04 +09:00
Yukihiro "Matz" Matsumoto
c8229dbd19
Merge pull request #2846 from take-cheeze/mgem_mrbgem
...
Add :mgem gem loading.
2015-06-22 10:04:00 +09:00
take_cheeze
078d24d4d3
Add documentation to new mgem features.
2015-06-22 02:24:15 +09:00
take_cheeze
0c8fa845e4
Load missing dependencies from core or mgem-list.
2015-06-22 02:23:52 +09:00
take_cheeze
8d54977d25
Add :mgem gem loader to load mrbgem from mgem-list ( https://github.com/mruby/mgem-list ).
2015-06-22 02:23:11 +09:00
Yukihiro "Matz" Matsumoto
7cf94bac10
Merge pull request #2842 from davydovanton/doc-fix-old-link
...
Fix repository link to mruby/mruby
2015-06-20 22:49:21 +09:00
Anton Davydov
111602319b
Fix repository link to mruby/mruby [skip ci]
2015-06-20 13:27:36 +03:00