Tatsuya Matsumoto
43944a0d3a
fix mruby command returning EXIT_SUCCESS when program file can't be
...
opened.
2014-03-05 16:51:57 +09:00
Yukihiro "Matz" Matsumoto
d03c72ad53
Merge branch 'master' of github.com:mruby/mruby
2014-03-05 15:38:27 +09:00
Yukihiro "Matz" Matsumoto
865b850b76
should check crossing C boudary from resume
2014-03-05 15:38:13 +09:00
mattn
7510d9adee
s/\\"/"/g in mruby-config
2014-03-05 13:50:14 +09:00
Yukihiro "Matz" Matsumoto
f911b23599
Merge pull request #1801 from mattn/mruby-config
...
Add mruby-bin-mruby-config
2014-03-05 13:18:39 +09:00
mattn
67b8f6ec60
Don't echo empty string. (Remove workaround for windows)
2014-03-05 12:56:27 +09:00
mattn
48616a85af
chmod 755
2014-03-05 12:51:15 +09:00
Tatsuya Matsumoto
23cb0bb64b
mruby command should not execute program on "syntax only option(-c)".
2014-03-05 12:49:58 +09:00
mattn
fb621ef411
Add mruby-bin-mruby-config
2014-03-05 12:46:07 +09:00
mattn
d59b738b43
Fix #1793
2014-03-04 22:25:25 +09:00
Tomoyuki Sahara
4ad0896bda
add Integer#div and Float#div.
2014-03-04 12:45:11 +09:00
take_cheeze
24e3e33cb6
use tempfile module
2014-03-03 17:01:47 +09:00
take_cheeze
fa5c3d4f51
add test to check striped binary works correctly
2014-03-03 16:58:27 +09:00
Tatsuya Matsumoto
d496ba7e25
fix a memory leak in mruby-random.
2014-03-02 22:18:02 +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
2c7204fc93
mrb_fiber_yield() is available now; you have to link mruby-fiber mrbgem to use the function; there's no function available to create new fiber from C (countapart of Lua's lua_newthread), but that's because you cannot create a new fiber from C due to mruby C API design limitation. define your method to create fibers in Ruby; close #1269
2014-03-01 00:48:08 +09:00
Yukihiro "Matz" Matsumoto
1f134d723c
cancel 313f6b; add fallthrough comment
2014-02-28 18:55:30 +09:00
Yukihiro "Matz" Matsumoto
cb7f82ac45
Merge pull request #1756 from chasonr/sprintf-utf8
...
Implement sprintf("%c") for UTF-8.
2014-02-28 18:45:31 +09:00
chasonr
d60944ef3a
Test for UTF-8 as mattn suggests.
...
The string is "Hello world" in Japanese. (hat tip: Google Translate.)
2014-02-27 23:42:07 -05:00
take_cheeze
1266ab6500
add mruby-strip tool to strip irep's debug info
2014-02-28 00:36:08 +09:00
chasonr
b752b01a56
Update the Fixnum#chr test for UTF-8.
2014-02-26 20:53:23 -05:00
chasonr
5e5ee841a1
Implement sprintf("%c") for UTF-8.
...
* sprintf("%c") is changed to accept a string for which String#size returns
1, even if it is longer than one byte, and to convert a Fixnum via
Fixnum#chr (possibly returning more than one byte). Thus, if the UTF-8
gem is in use, a character will be understood as a single UTF-8 character.
* The change to sprintf depends on the implementation of Fixnum#chr added
to mrbgems/mruby-string-utf8/src/string.c.
This should work with any other gem that implements a multibyte encoding, as
long as it implements String#size and Fixnum#chr as appropriate.
2014-02-26 20:18:26 -05:00
Yukihiro "Matz" Matsumoto
313f6b5997
forget to break in the switch statement
2014-02-27 08:23:32 +09:00
Yukihiro "Matz" Matsumoto
c93f873ac0
Merge pull request #1744 from cubicdaiya/feature/introduce_mrb_str_cat_lit
...
Introduce mrb_str_cat_lit
2014-02-26 21:54:05 +09:00
cubicdaiya
a860735d0c
use mrb_str_cat_lit() more widely
2014-02-26 03:03:47 +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
feeaea8dcd
Merge pull request #1737 from chasonr/Random-static-data
...
Implement default Random instance.
2014-02-25 19:16:01 +09:00
cubicdaiya
96c24b0a37
small-optimization2 for mrb_time_zone
...
mrb_str_new_static is more efficient than mrb_str_new in this case.
2014-02-25 15:24:02 +09:00
cubicdaiya
985e4892cf
small-optimization for mrb_time_zone
...
Using mrb_str_new instead of mrb_str_new_cstr
2014-02-25 15:03:35 +09:00
chasonr
7c9ff7c8ff
Implement default Random instance.
...
Previously, the default random number generator was implemented using static
storage. This storage is common to all instances of mruby in a process, and
use of the default random number generator in one instance will perturb the
default random number generator in other instances. It is also not thread
safe.
With this change, the default random number generator is defined as
Random::DEFAULT, as it is in CRuby.
2014-02-25 00:06:31 -05:00
Yukihiro "Matz" Matsumoto
ddf9504558
Merge pull request #1721 from take-cheeze/d_format_spec
...
add 'd' format specifier in mrb_get_args and mruby-random gem improvement
2014-02-25 00:22:27 +09:00
kyab
1cf619d3b4
Fix unused function warning when readline enabled (mirb)
2014-02-23 20:43:43 +09:00
take_cheeze
658b4f4ea7
add test(requires MRB_GC_FIXED_ARENA enabled)
2014-02-22 00:28:38 +09:00
take_cheeze
a9af8c9c07
fix possible arena overflow
2014-02-22 00:05:05 +09:00
take_cheeze
f863025bd6
use 'd' format spec to get Random object
2014-02-21 17:36:58 +09:00
take_cheeze
d345134fb8
use mrb_intern_lit in mruby-random
2014-02-21 17:07:48 +09:00
cubicdaiya
3d716f2376
Give the type 'void' to functions have no argument.
...
According to the C standard,
it is desirable to give the type 'void'
to functions have no argument.
2014-02-14 19:47:15 +09:00
Li Yazhou
876e7de7ec
add a regression test for #1706
2014-02-14 11:32:59 +08:00
Li Yazhou
9ebfeac111
keep stack with nlocals instead of nregs; fix #1706
2014-02-14 11:16:56 +08:00
Yukihiro "Matz" Matsumoto
ba8a8e75c7
Merge pull request #1702 from cremno/hash-hash-ext-changes
...
hash / hash-ext: various small changes
2014-02-14 01:29:19 +09:00
cremno
8bbc2c107b
mrb_str_cat2: deprecated since 0cedf8f
2014-02-13 13:45:28 +01:00
cremno
4ffea85b62
hash / hash-ext: various small changes
...
src/hash.c:
- mrb_hash_(aget|aset|dup|delete): internal linkage
- remove documentation of methods which are not implemented (in here)
- remove #assoc; unused, not in ISO spec
- remove #rassoc: same, implementation is also wrong
hash-ext mrbgem:
- remove header "mruby/khash.h"
- remove mrb_hash_values_at (move code into hash_values_at, i: long -> int)
- less whitespace in gem_init function
2014-02-13 13:39:09 +01:00
cremno
b7899aa6ee
mruby-math: remove Cygwin compatibility macros
...
nan:
The first non-test release of Cygwin 1.5.x was over a decade ago:
<http://cygwin.com/ml/cygwin-announce/2003-09/msg00001.html >
log/log10:
This workaround is not needed anymore (1.2.6.1, 1.3 - both over 6 years ago):
<https://sourceware.org/cgi-bin/cvsweb.cgi/src/newlib/libm/math/w_log.c?cvsroot=src >
2014-02-12 00:03:12 +01:00
Yukihiro "Matz" Matsumoto
d7960bf2a9
resolve conflict in travis_config.rb
2014-02-10 09:50:32 +09:00
Yukihiro "Matz" Matsumoto
00bdaec766
initialize ci->stackent at the top; #1691
2014-02-09 19:20:16 +09:00
Yukihiro "Matz" Matsumoto
19a08b8455
Merge pull request #1674 from cremno/mrb_bool-FALSE-TRUE
...
use mrb_bool, FALSE and TRUE more
2014-02-09 18:35:20 +09:00
Yukihiro "Matz" Matsumoto
b35893ee13
Merge pull request #1689 from Bovi-Li/remove-notice
...
Remove *very early version* notice
2014-02-08 13:53:41 +09:00
Yukihiro "Matz" Matsumoto
4a2c37df93
made mrb_define_class to return existing class, with heavy refactoring
2014-02-08 13:44:31 +09:00
Daniel Bovensiepen
5056a29d93
Remove notice of early version
2014-02-08 03:06:05 +08:00
Yukihiro "Matz" Matsumoto
3ff9aad22f
move version info from gems to core; ref #576 #1684
2014-02-07 12:18:55 +09:00