Yuhei Okazaki
06435f5bc7
fix maximum value of the index when access breakpoints.
2015-03-31 10:52:10 +09:00
cremno
c47cc0c3bb
call C11's timespec_get()
...
gettimeofday() is an obsolescent POSIX function which may be removed in
a future version. POSIX recommends using clock_gettime() (also POSIX)
instead, but it isn't available on OS X or Windows (at least with MSVC
and older MinGW versions).
Whereas timespec_get() is part of ISO C11 and mruby uses some small
other C11 features too. It isn't universally available yet either, but
it might be in the future. And Visual C++ 2015 implements it! Since
mruby strives for ISO C and not POSIX compatibility, I think it's a
reasonable choice.
TIME_UTC is used instead of __STDC_VERSION__, because if TIME_UTC is
defined, then most likely timespec_get() is too. This isn't true in case
of __STDC_VERSION__ (see MSVC).
2015-03-22 22:52:12 +01:00
Yukihiro "Matz" Matsumoto
0609abb3f7
new API function mrb_fiber_resume(); ref #1269
2015-02-19 10:02:43 +09:00
Yukihiro "Matz" Matsumoto
80c343aec9
add description comment to mrb_fiber_yield()
2015-02-19 10:02:02 +09:00
Jun Hiroe
ac131c9052
Remove eql_p variable in mrb_struct_eql func
2015-02-07 01:46:56 +09:00
Jun Hiroe
7dff6ab75a
Remove eql_p variable in mrb_struct_equal func
2015-02-07 01:46:45 +09:00
MATSUMOTO Ryosuke
7367bf6ffe
mruby-config supports MRUBY_LDFLAGS_BEFORE_LIBS in libmruby.flags.mak
2015-02-06 07:15:54 -08:00
Yukihiro "Matz" Matsumoto
d764632f86
Merge pull request #2680 from sdottaka/add-fflush
...
mrdb, mirb: Add fflush() so that a external program can read output imme...
2015-01-19 08:30:52 +09:00
sdottaka
af51a4ac9d
mrdb: fix crash when stepping into Proc.call
...
How to reproduce:
```
cat a.rb
Proc.new { 1 }.call
echo step | mrdb a.rb
```
2015-01-18 10:00:56 +09:00
Jun Hiroe
e998094297
Add String#upto
2015-01-13 16:32:30 +09:00
Yukihiro "Matz" Matsumoto
4aef1ad209
Merge pull request #2700 from takahashim/string-ljust
...
add String#ljust into mruby-string-ext
2015-01-13 16:19:46 +09:00
takahashim
1b606025ed
add String#ljust into mruby-string-ext
2015-01-12 22:16:29 +09:00
takahashim
9dff0aedb1
fix Segmentation fault on Struct#inspect due to recursive Struct object
2015-01-12 20:08:53 +09:00
Yukihiro "Matz" Matsumoto
53da1fb5a1
Merge pull request #2697 from cubicdaiya/use-sizeof
...
Use sizeof() instead of strlen().
2015-01-10 10:50:21 +09:00
Tatsuhiko Kubo
dae42ffe54
Removed duplicated declarations.
...
* `mrb_show_version()`
* `mrb_show_copyright()`
2015-01-03 22:56:36 +09:00
Tatsuhiko Kubo
2b753167ca
Use sizeof() instead of strlen().
2015-01-03 22:37:11 +09:00
Tatsuhiko Kubo
df5f83cb84
fixed error-handling for mrb_open().
...
When mrb_open() is called again, it is not checked.
2015-01-03 20:56:49 +09:00
sdottaka
71548aabb7
Add fflush() (2)
2015-01-03 14:52:11 +09:00
Tatsuhiko Kubo
606095f2fe
Remove redundant NULL checks for mrb_malloc().
2015-01-01 05:12:41 +09:00
Jun Hiroe
3a21c9b6d7
Avoid block_given? in mrbgem:enum.rb to reduce method calls
2014-12-27 18:17:29 +09:00
sdottaka
79f703ecba
mruby-eval: fix typo
2014-12-23 22:17:07 +09:00
sdottaka
80a742df51
mrdb: fix that break command cannot handle Windows paths
...
Before fix:
```
$ mrdb c:\tmp\b.rb
(c:\tmp\b.rb:1) break c:\tmp\b.rb:3
Class name 'c' is invalid.
```
After fix:
```
$ mrdb c:\tmp\b.rb
(c:\tmp\b.rb:1) break c:\tmp\b.rb:3
Breakpoint 1: file c:\tmp\b.rb, line 3.
```
2014-12-20 08:32:28 +09:00
Yukihiro "Matz" Matsumoto
10e9a1a167
now retrieves number of arguments of blocks from OP_ENTER op code; close #2671
2014-12-19 19:45:20 +09:00
sdottaka
9a0fb6f91b
mrdb, mirb: Add fflush() so that a external program can read output immediately.
2014-12-19 16:09:55 +09:00
Yukihiro "Matz" Matsumoto
5b203ead1e
mruby-eval: proc from env may be NULL; close #2676
2014-12-17 12:35:19 +09:00
Yukihiro "Matz" Matsumoto
ed56d56dab
avoid out-of-bounds access of irep->lv; ref #2671 , fix #2675
...
allocation size of irep->iv is irep->nlocals-1.
2014-12-17 11:14:14 +09:00
Yukihiro "Matz" Matsumoto
a19a6edb7c
mrb_str_new(mrb, "", len) creates an unmodifiable string object; ref #2674
2014-12-17 08:06:44 +09:00
Jun Hiroe
7ea38ce473
Add String#prepend
2014-12-17 02:23:36 +09:00
Yukihiro "Matz" Matsumoto
ab72410456
eval() should preserve stack in env properly; fix #2671
2014-12-17 01:10:19 +09:00
Yukihiro "Matz" Matsumoto
fcbb7ec49d
Fix crash if #inspect does not return a string value
2014-12-16 19:26:40 +09:00
Jun Hiroe
45a442a9d7
Add String#insert
2014-12-13 15:31:22 +09:00
Yukihiro "Matz" Matsumoto
96d02b1268
Merge pull request #2667 from murasesyuka/usage_message_is_used_switches_instead_of_option
...
fix usage message
2014-12-12 22:13:06 +09:00
Yukihiro "Matz" Matsumoto
9723d6e4ba
mirb dies if #inspect returns a non-string value; fix #2666
2014-12-12 13:14:56 +09:00
murase_syuka
77c6bfe287
fix usage message
2014-12-11 06:54:15 +09:00
Tomoyuki Sahara
5f68be7190
String#[] accepts float.
2014-12-05 13:42:58 +09:00
murase_syuka
39b4caea81
closing to Local Scope
2014-11-29 01:02:40 +09:00
murase_syuka
1248e2ba8a
adhoc fix for pass build
2014-11-27 01:12:01 +09:00
Yukihiro "Matz" Matsumoto
1365151dcb
Merge pull request #2652 from cremno/mrdb-add-missing-null-termination
...
mrdb: add missing null-termination
2014-11-26 01:05:04 +09:00
cremno
553b9df306
free memory used by breakpoints
2014-11-26 00:43:39 +09:00
cremno
1cc6eaca2a
free return value of dirname()
2014-11-26 00:43:39 +09:00
Hiroshi Mimaki
251dbca8e2
Merge pull request #2644 from cremno/mrdb-minor-changes
...
mrdb: minor changes
2014-11-25 14:11:57 +09:00
cremno
5f1e90fc58
add missing null-termination
2014-11-25 01:46:06 +01:00
TOMITA Masahiro
0a0afa7c6a
Fix String#slice! raise TypeError or return invalid value.
2014-11-23 21:26:50 +09:00
Tatsuhiko Kubo
48a04ff1b4
use mrb_str_xxx_lit for mrdb.
2014-11-22 10:43:01 +09:00
cremno
c9c0f9a79b
remove const type qualifier
...
clang 3.5.0 with -Wextra produces a -Wignored-qualifiers diagnostic.
2014-11-20 02:39:48 +01:00
cremno
c2bc44e131
don't convert function pointer to object pointer
2014-11-20 02:39:47 +01:00
cremno
337395c1ee
remove cast
...
C99+TC3, 7.19.7.1p2: [...] the fgetc function obtains that character as
an unsigned char converted to an int [...]
2014-11-20 02:39:46 +01:00
cremno
83c48ff966
fix heap-use-after-free
2014-11-20 00:55:46 +01:00
mimaki
e5bacc03f2
Add mruby debugger (mrdb)
2014-11-18 23:33:32 +09:00
M.Naruoka
14bc76d578
Under cygwin host, ncurses.a is only available instead of termcap.a.
2014-10-31 16:48:50 +09:00