Yukihiro Matsumoto
ec8f97d2a6
add "all" to test dependency
2012-05-20 23:01:53 +09:00
Yukihiro Matsumoto
54a921ba1b
ANSIfy name2ctype.h
2012-05-20 22:55:52 +09:00
Yukihiro Matsumoto
c3fc0c1929
'not (2)' should not raise warning
2012-05-20 22:47:00 +09:00
Yukihiro Matsumoto
0bba67626e
waring refactoring; print line number
2012-05-20 22:46:10 +09:00
Yukihiro "Matz" Matsumoto
ac31b58fe8
Merge pull request #169 from mitchblank/cplusplus
...
Part 1 of C++ compilability
2012-05-20 06:09:31 -07:00
Yukihiro "Matz" Matsumoto
89865740e4
Merge pull request #168 from k-tsj/add-cast
...
Add cast to remove "cast from pointer to integer of different size" warning
2012-05-20 06:08:12 -07:00
Yukihiro Matsumoto
ee72000161
use mrb_assoc_new to generate a key-value pair
2012-05-20 22:05:49 +09:00
Yukihiro "Matz" Matsumoto
64823cbd35
Merge pull request #167 from bovi/fix-hash-shift
...
Fix Hash#shift return value from Hash to Array
2012-05-20 06:03:46 -07:00
Mitchell Blank Jr
606a1665c5
C++ compilability - avoid 'goto' across a variable initialization
...
C++ is pickier about when a 'goto' can cross a variable being delcared.
The fix is to just add a set of braces to restrict the variable's scope.
Without this, g++ will fail with:
regcomp.c:3057: error: jump to label 'set_call_attr'
regcomp.c:3087: error: from here
regcomp.c:3041: error: skips initialization of 'int gnum'
2012-05-20 00:26:49 -07:00
Kazuki Tsujimoto
df6f917df8
Fix wrong cast
2012-05-20 16:23:34 +09:00
Mitchell Blank Jr
1ad7a1e3d8
C++ compilability: don't use "node" as both a type and a member
...
I originally solved this by renaming the "node" type to "node_t",
but Matz didn't like that. He suggested renaming the member
variable "nd" instead:
https://github.com/mruby/mruby/pull/144#issuecomment-5743153
2012-05-20 00:19:38 -07:00
Mitchell Blank Jr
42c6b324db
C++ compilability -- don't jump across variable initialization
...
C++ is picker than C about when you can "goto" across a variable being
defined. The fix is to just minimize the variable's scope inside an
extra set of brackets.
Without this change, g++ has the following errors:
transcode.c:590: error: jump to label 'resume_label3'
transcode.c:514: error: from here
transcode.c:582: error: crosses initialization of 'const unsigned char* p'
transcode.c:2124: error: jump to label 'set_encs'
transcode.c:2184: error: from here
transcode.c:2088: error: skips initialization of 'const char* err'
transcode.c:2089: error: skips initialization of 'size_t error_len'
transcode.c:2090: error: skips initialization of 'mrb_value bytes'
transcode.c:2091: error: skips initialization of 'mrb_value dumped'
transcode.c:2092: error: skips initialization of 'size_t readagain_len'
transcode.c:2093: error: skips initialization of 'mrb_value bytes2'
2012-05-20 00:06:49 -07:00
Mitchell Blank Jr
8c752c73e2
"volatile" no longer needed here
...
See Matz's comment here:
https://github.com/mruby/mruby/pull/144#issuecomment-5754054
2012-05-19 23:44:43 -07:00
Mitchell Blank Jr
d9529f198d
fix mrb_gc_mark_ht_size() and mrb_gc_free_ht() types
...
mrb_gc_mark_ht_size() and mrb_gc_free_ht() were declared in gc.h as
taking a "RHash *" argument, but then they were defined in hash.c
as taking a "RClass *" Get these in sync.
2012-05-19 23:33:01 -07:00
Mitchell Blank Jr
e3abf33384
C++ compilability: "not" is a C++ keyword, avoid it
...
see http://en.cppreference.com/w/cpp/language/operator_alternative
2012-05-19 23:28:40 -07:00
Mitchell Blank Jr
365cc40ac5
C++ compilabilty -- "new" is a C++ keyword, avoid it
2012-05-19 23:20:44 -07:00
Mitchell Blank Jr
be0e3fdf51
C++ compilability -- "try" is a keyword, avoid as variable name
2012-05-19 23:18:47 -07:00
Mitchell Blank Jr
4ebd0361e4
Helper functions for st_foreach() return "enum st_retval" not "int"
...
Just making this a bit more consistent throughout the code
2012-05-19 23:16:54 -07:00
Kazuki Tsujimoto
db196c5128
Add cast to remove "cast from pointer to integer of different size" warning
2012-05-20 14:41:50 +09:00
Mitchell Blank Jr
3471e2b134
C++ compilability - don't define types inside others
...
The following is legal code in both C and C++:
struct foo {
struct bar { int a } x;
int y;
};
...however in C++ it defines a type called "foo::bar" instead of "bar".
Just avoid this construct altogether
2012-05-19 22:40:57 -07:00
Daniel Bovensiepen
e1e072b800
Fix Hash#shift return value from Hash to Array
2012-05-20 13:18:34 +08:00
Mitchell Blank Jr
4105b59568
C++ compilability -- make mrb_object() macro return an RObject, not void
2012-05-19 22:18:34 -07:00
Yukihiro "Matz" Matsumoto
c8b679bf69
Merge pull request #166 from bovi/master
...
Add Tests for String, Hash, Range and Symbol
2012-05-19 16:14:56 -07:00
Daniel Bovensiepen
4a8c740cb6
Delete Plattform status again
2012-05-19 23:21:07 +08:00
Daniel Bovensiepen
e4adbc733a
Merge branch 'master' of github.com:bovi/mruby
2012-05-19 23:19:53 +08:00
Daniel Bovensiepen
d45ecc3270
Complete ISO test cases for Hash, Range, String and Symbol
2012-05-19 23:18:42 +08:00
Yukihiro Matsumoto
d0a7b08303
mirb code termination policy changed
2012-05-19 22:20:16 +09:00
Yukihiro Matsumoto
d10aec8aa9
mirb termination command renamed to quit
2012-05-19 22:10:46 +09:00
Yukihiro Matsumoto
7701795951
unterminated string detection made easy
2012-05-19 22:10:15 +09:00
Yukihiro Matsumoto
2ed31892a8
should initialize p->sterm every parse time
2012-05-19 17:52:41 +09:00
Daniel Bovensiepen
e7b9c2bcee
Add information file for supported plattforms
2012-05-19 01:00:08 -07:00
Yukihiro Matsumoto
59da9f6974
remove src/pool.h; close #163
2012-05-19 16:56:15 +09:00
Yukihiro Matsumoto
04cafb7fb3
even smarter expression termination detection
2012-05-19 16:44:36 +09:00
Yukihiro Matsumoto
6f6c270bb1
mirb should detect end of expression smarter
2012-05-19 16:15:11 +09:00
Yukihiro Matsumoto
aeca23166b
remove dependency to node.h and pool.h
2012-05-19 15:52:47 +09:00
Yukihiro Matsumoto
cb8b4691f0
p->tree may be NULL; close #161
2012-05-19 15:37:41 +09:00
Yukihiro "Matz" Matsumoto
6421887917
Merge pull request #160 from bovi/master
...
Finish all Integer ISO Tests
2012-05-18 18:57:32 -07:00
Daniel Bovensiepen
8bf21cdeae
Finish all Float ISO Tests
2012-05-19 02:21:26 +08:00
Daniel Bovensiepen
2331738c21
Complete Integer Tests for ISO
2012-05-19 00:44:43 +08:00
Yukihiro Matsumoto
00c419f066
remove obsolete minimain.c
2012-05-18 22:32:10 +09:00
Yukihiro Matsumoto
53f74d50ae
update test/Makefile
2012-05-18 17:36:43 +09:00
Yukihiro "Matz" Matsumoto
9461da4a6c
Merge pull request #157 from mattn/no_close_stdin
...
don't close stdin.
2012-05-18 00:34:57 -07:00
Yukihiro "Matz" Matsumoto
631ab3536d
Merge pull request #158 from pbosetti/tests
...
Minor edits to test suite and Math module
2012-05-18 00:33:43 -07:00
Paolo Bosetti
d1f6f504d5
Added some tests for Math module. Some refactoring in math.c; numeric tolerance exported as Math::TOLERANCE and also used for fuzzy tests in mrbtest suite
2012-05-17 23:50:56 -07:00
mattn
751d391aab
don't close stdin.
2012-05-18 15:36:18 +09:00
Yukihiro Matsumoto
2728f30297
implement Kernel#p in Ruby
2012-05-18 15:01:45 +09:00
Paolo Bosetti
8027d5120d
Merge branch 'tests' of github.com:pbosetti/mruby into tests
2012-05-17 22:55:35 -07:00
Yukihiro Matsumoto
f7406435f3
mruby should read from stdin when no argument given
2012-05-18 14:51:27 +09:00
Yukihiro Matsumoto
f81ddf9025
terminate programs after showing version/copyright
2012-05-18 14:49:09 +09:00
Yukihiro Matsumoto
f4bacab18b
rename ruby_show_version to mrb_show_version
2012-05-18 14:45:05 +09:00