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
Yukihiro "Matz" Matsumoto
ed1bf9aa80
introduce mrb_str_new_lit() to create strings from C string litrals
2014-02-06 07:50:34 +09:00
MATSUMOTO Ryosuke
2e564153ac
Fix MRUBY_BIRTH_YEAR
2014-02-05 23:58:08 +09:00
MATSUMOTO Ryosuke
dadf06f72b
Add global constant MRUBY_COPYRIGHT
2014-02-05 23:54:15 +09:00
MATSUMOTO Ryosuke
456a765e53
replace Kernel.show_version with MRUBY_DESCRIPTION
2014-02-05 22:17:44 +09:00
MATSUMOTO Ryosuke
6c91ba001f
Fix release date
2014-02-05 21:17:00 +09:00
MATSUMOTO Ryosuke
e0c10d03da
Add pluggable versioning by mruby-version
2014-02-05 18:45:09 +09:00
mattn
c850372029
Remove warning
2014-02-04 18:12:35 +09:00
Yukihiro "Matz" Matsumoto
857e384187
fibers cannot cross C function boundary; close #1680
2014-02-04 14:01:22 +09:00
cremno
4507985c3e
use mrb_bool, FALSE and TRUE more
...
It doesn't matter to me if one is using FALSE/TRUE instead of 1/0
but I prefer a type (alias) which emphasizes boolean vars to int.
I changed 1/0 to FALSE/TRUE anyway.
2014-01-31 18:00:36 +01:00
cremno
a2cfc9a9af
rework mruby-objectspace and gc.[ch]
...
- functions should have C linkage (for C++ code)
- add prefix to each_object_callback
- use more appropriate variable types / initialization
- ObjectSpace::count_objects has 1 opt. arg.
- prefer mrb_intern_lit to mrb_intern_cstr for str. lit.
- mruby/value.h is included by mruby.h
- adjust coding style
2014-01-31 17:42:05 +01:00
Yukihiro "Matz" Matsumoto
6cf42a8200
Merge pull request #1671 from cremno/extern-cleanup
...
clean up external symbols
2014-01-31 00:03:28 -08:00
cremno
bb25d42d0d
add missing declaration of mrb_str_format
2014-01-31 01:34:20 +01:00