Yukihiro "Matz" Matsumoto
b4e1889813
Merge pull request #3153 from kou/remove-needless-assignment
...
Remove needless assignment
2016-05-09 17:35:19 +09:00
Kouhei Sutou
51cc35dc09
Remove needless assignment
...
d4ee409ae9 should remove this line.
2016-05-09 14:05:51 +09:00
Yukihiro "Matz" Matsumoto
ea033526fb
Merge pull request #3151 from okkez/use-stack-directly
...
Use stack directly
2016-04-27 12:14:54 +09:00
Kenji Okimoto
d4ee409ae9
Use stack directly
...
See https://github.com/mruby/mruby/pull/3142#issuecomment-201138873
2016-04-27 10:18:13 +09:00
Yukihiro "Matz" Matsumoto
8f0c1c7d3c
mruby-sprintf:fix double negative signs in printf; fix #3148
...
MRB_INT_MAX does not have corresponding positive integer
2016-04-23 23:50:01 +09:00
Yukihiro "Matz" Matsumoto
c5229074bb
mruby-sprintf: format specifiers o,u,x,b ignore sign(+); ref #3148
2016-04-23 22:20:11 +09:00
Yukihiro "Matz" Matsumoto
e5c2013829
Merge pull request #3147 from ksss/1.8
...
Avoid Syntax Error on CRuby v1.8
2016-04-16 23:27:15 +09:00
ksss
451523ff02
Avoid Syntax Error on CRuby v1.8
...
CRuby v1.8 dose not support named capture
2016-04-16 22:39:09 +09:00
Yukihiro "Matz" Matsumoto
fa1a17cbc4
Merge pull request #3145 from timoschilling/patch-1
...
fix syntax highlighting
2016-04-14 00:04:54 +09:00
Timo Schilling
1863f325c0
fix syntax highlighting
2016-04-13 13:41:31 +02:00
Yukihiro "Matz" Matsumoto
8c67e915b4
mruby-eval: instance_eval should keep target_class; close #3141
2016-04-11 14:28:44 +09:00
Yukihiro "Matz" Matsumoto
ae5b5ce575
vm.c: mrb_hash_set() may reallocate VM stack; close #3133
2016-04-11 14:11:44 +09:00
Yukihiro "Matz" Matsumoto
d97a37eb7b
fix possible memory leak in mruby-time gem
2016-04-04 21:58:46 +09:00
Yukihiro "Matz" Matsumoto
e1e888e354
fix too much optimization for ||=
2016-04-01 01:22:16 +09:00
Yukihiro "Matz" Matsumoto
d098d823de
fix duplicated eval in op_asgn
...
`a` in `a.m += c` or `a[b] += c` should be evaluated only once.
2016-03-30 20:43:57 +09:00
Yukihiro "Matz" Matsumoto
4979b52d61
reduce OP_ARRAY in argument splat
2016-03-30 01:35:11 +09:00
Yukihiro "Matz" Matsumoto
0e03a7f2a3
mruby-enum-ext: refine minmax
2016-03-30 01:12:18 +09:00
Yukihiro "Matz" Matsumoto
4d909d8b2b
Merge pull request #3142 from kou/add-missing-regs-update
...
Add missing regs update
2016-03-25 13:41:35 +09:00
Kouhei Sutou
c69cba2ad9
Add missing regs update
...
mrb_vm_define_class() may realloc() mrb->c->stack because it calls
mrb_funcall() for inherited hook. If mrb->c->stack is realloc()-ed, regs
refers orphan address.
2016-03-25 00:25:48 +09:00
Yukihiro "Matz" Matsumoto
dd072b5364
remove wrong ISO section from safe navigation test; ref 4c1ce0f6
2016-03-24 23:35:04 +09:00
Yukihiro "Matz" Matsumoto
3886becec5
better code generation for ||=; #3138
2016-03-24 16:03:58 +09:00
Yukihiro "Matz" Matsumoto
1ce471c1cc
||= with cvars and constants should work with false values; #3138
2016-03-24 07:59:58 +09:00
Yukihiro "Matz" Matsumoto
4fcff34747
||= reference error can happen with constants as well; #3138
2016-03-23 23:51:23 +09:00
Yukihiro "Matz" Matsumoto
817b884343
add #dig tests
2016-03-23 12:34:32 +09:00
Yukihiro "Matz" Matsumoto
daf83946bb
add #dig to Array,Hash and Struct
2016-03-23 11:49:28 +09:00
Yukihiro "Matz" Matsumoto
4c1ce0f61c
add safe-navigation operator tests
2016-03-23 08:51:25 +09:00
Yukihiro "Matz" Matsumoto
21a3ae08f7
add safe-navigation (aka lonely) operator &.
2016-03-23 08:51:25 +09:00
Yukihiro "Matz" Matsumoto
7d0612528e
Merge pull request #3139 from cremno/fix-vs2010-build
...
deprecate and fix VS2010/2012 build
2016-03-23 00:22:26 +09:00
cremno
30b0100e6c
fix VS2010/2012 build
...
They don't have <inttypes.h>, only <stdint.h>.
2016-03-22 11:46:49 +01:00
cremno
bfc7b2e30f
deprecate Visual Studio 2010 and 2012
2016-03-22 11:41:16 +01:00
cremno
611e99e741
remove unnecessary array/each
2016-03-22 11:38:09 +01:00
Yukihiro "Matz" Matsumoto
2b0baec32a
fixed silly class variable/constant confusion; #3138
2016-03-22 00:06:32 +09:00
Yukihiro "Matz" Matsumoto
a02acf2635
rescue NameError from class variable access like @@foo ||= 42; fix #3138
2016-03-21 03:49:08 +09:00
Yukihiro "Matz" Matsumoto
643d967b10
Merge pull request #3131 from bggd/fix_bintest_on_windows
...
Fix doesn't work bintest on :visualcpp toolchain
2016-03-16 16:29:14 +09:00
Yukihiro "Matz" Matsumoto
52d388515f
Merge pull request #3132 from pbosetti/edison
...
Added example for cross-compiling on Intel Edison
2016-03-16 16:28:35 +09:00
Yukihiro "Matz" Matsumoto
273eac6b64
Merge pull request #3136 from bggd/add_appveyor
...
Add appveyor.yml
2016-03-16 16:27:58 +09:00
bggd
51cb72962d
Create appveyor_config.rb
2016-03-15 20:43:51 +09:00
bggd
87e5b0f30c
Add appveyor.yml for Visual Studio 2015/2013
2016-03-15 20:41:15 +09:00
Yukihiro "Matz" Matsumoto
4f20d58ac2
Merge pull request #3135 from wanabe/reduce-include-paths
...
Reduce compiler include_paths
2016-03-14 09:35:53 +09:00
wanabe
2aa6b449a2
Reduce compiler include_paths
2016-03-13 17:06:39 +09:00
Paolo Bosetti
a27426aa8d
Added example for cross-compiling on Intel Edison
2016-03-07 17:50:03 +01:00
bggd
a138ae3506
Fix doesn't work bintest on :visualcpp toolchain
2016-03-07 14:50:21 +09:00
Yukihiro "Matz" Matsumoto
41d6ba23b5
fix dump_prefix() with wrong type argument; fix #3128
2016-03-07 10:59:34 +09:00
Yukihiro "Matz" Matsumoto
0c28c7d754
change backtrace sep from const char* to char
2016-03-07 10:59:34 +09:00
Yukihiro "Matz" Matsumoto
4e95779851
Merge pull request #3125 from zzak/default-benchmark-build-config
...
Add default benchmark build config
2016-03-07 10:27:36 +09:00
Yukihiro "Matz" Matsumoto
b4d946f6bc
Merge pull request #3129 from kou/fix-segv-by-backtrace-and-gc
...
Fix SEGV by backtrace and GC
2016-03-06 12:15:55 +09:00
Yukihiro "Matz" Matsumoto
1a4540fb4a
Merge pull request #3127 from kou/suppress-warning
...
Suppress a warning
2016-03-06 12:13:05 +09:00
Kouhei Sutou
f1eb3aea11
Fix segmentation fault by backtrace and GC
...
GitHub: fix #3122
It reverts #3126 . #3126 fixes the segmentation fault but generates
broken backtrace.
This change fixes the segmentation fault and generates correct
backtrace. The strategy of this change is "generating backtrace while
irep is alive".
/tmp/test.rb:
def gen
e0 = nil
begin
1.times {
raise 'foobar'
}
rescue => e
e0 = e
end
e0
end
e = gen
GC.start
gen
GC.start
puts e.backtrace.join("\n")
Run:
% bin/mruby /tmp/test.rb
/tmp/test.rb:5:in Object.gen
/home/kou/work/ruby/mruby.kou/mrblib/numeric.rb:77:in Integral#times
/tmp/test.rb:4:in Object.gen
/tmp/test.rb:13
FYI:
% ruby -v /tmp/test.rb
ruby 2.3.0p0 (2015-12-25) [x86_64-linux-gnu]
/tmp/test.rb:5:in `block in gen'
/tmp/test.rb:4:in `times'
/tmp/test.rb:4:in `gen'
/tmp/test.rb:13:in `<main>'
2016-03-06 11:58:54 +09:00
Kouhei Sutou
d77c72dac5
Revert "Merge pull request #3126 from jbreeden/backtrace_irep_null_check"
...
This reverts commit bf7719fe8d , reversing
changes made to 4f4fa0ade0 .
We should get backtrace while irep is alive.
2016-03-06 11:51:04 +09:00
Kouhei Sutou
e5cce388ff
Suppress a warning
...
mrbgems/mruby-eval/src/eval.c: In function ‘create_proc_from_string’:
mrbgems/mruby-eval/src/eval.c:152:10: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
file = "(eval)";
^
2016-03-06 10:05:14 +09:00