Corey Powell
eb172c28d7
Applied gc patch to fix ORIGIN ICLASS method table leak
...
Based on the gc patch by ko1
https://github.com/ruby/ruby/commit/5922c954614e5947a548780bb3b894626affe6dd
2015-07-14 09:44:04 -05:00
Corey Powell
f0e920baf0
Renamed parameters in include_module_at
2015-07-14 08:55:53 -05:00
Blaž Hrastnik
78462c9181
Clean up tests
2015-07-13 23:46:41 +02:00
Blaž Hrastnik
8c4da7accd
assert() cannot be nested
2015-07-13 23:38:37 +02:00
Blaž Hrastnik
8c13e2b7c6
Set origin when doing kind_of? comparisons
2015-07-13 23:35:30 +02:00
Blaž Hrastnik
b0fb9ccfd8
Enable test_prepend_module_ancestors because it seems to pass.
2015-07-13 23:25:01 +02:00
Corey Powell
11cb41770d
Space out test_prepend_super_in_alias assert
...
Also tried to fix it, however the problem lies with how aliased methods
are done and their internal structure.
mruby simply aliases methods by grabbing the RProc and giving it a new name,
super then determines the original method to call by using the name
so a method called m, aliased as m2, will call the m2 super method instead of m
2015-07-13 10:45:57 -05:00
Corey Powell
81a2b3431c
included_modules, origin fix
...
Prepended modules would include their origin ICLASS
2015-07-13 09:49:51 -05:00
Corey Powell
199a808e36
Bugfix, included_modules would include classes
2015-07-13 09:49:18 -05:00
Corey Powell
1f678a4ace
Removed comment beside method_removed
...
Not sure if this apart of the ISO standard, so make sure its not misrepresented
2015-07-13 09:40:40 -05:00
Corey Powell
668153092f
Added Module#method_removed hook
2015-07-13 09:38:24 -05:00
Blaž Hrastnik
11dad71578
Enable visibility prepend tests again
2015-07-13 14:04:43 +02:00
Blaž Hrastnik
a725cb9093
Include prepended methods in the instance_methods list.
2015-07-13 14:04:43 +02:00
Corey Powell
47264bf289
Ported all MRI prepend tests
...
And of course, some of them fail miserably
2015-07-13 14:04:42 +02:00
Corey Powell
319553f0ef
Removed some debug prints from the test
2015-07-13 14:04:42 +02:00
Corey Powell
99aff17075
Ported a bit more of the MRI Module#prepend tests over
...
Currently kind_of fails miserably, still looking for the reason
2015-07-13 14:04:42 +02:00
Corey Powell
d4b009b394
Fixed Modules not being fully initialized before #initialize was called
2015-07-13 14:04:42 +02:00
Corey Powell
40f48034d5
Added changed check to the mrb_include_module
2015-07-13 14:04:42 +02:00
Corey Powell
ce66727177
Remove some remnant debug code
2015-07-13 14:04:42 +02:00
Corey Powell
005cacf18b
Additional patches to make this work
2015-07-13 14:04:42 +02:00
Blaž Hrastnik
97529c2a9a
Comment in a refactor to match MRI, but that fails 320 tests.
2015-07-13 14:04:42 +02:00
Blaž Hrastnik
2e617e37e1
origin must be initialized
2015-07-13 14:04:42 +02:00
Blaž Hrastnik
ad9f32c5a8
Expose insert position, which should be at origin for include and klass for
...
prepend.
2015-07-13 14:04:42 +02:00
Blaž Hrastnik
d046814d8b
Rename classes because of conflicts
2015-07-13 14:04:42 +02:00
Blaž Hrastnik
f962890a92
Implement Module#prepend.
2015-07-13 14:04:42 +02:00
Yukihiro "Matz" Matsumoto
d0e67aada7
use "S!" specifier of mrb_get_args() to improve #2882 fix.
2015-07-13 11:18:44 +09:00
Yukihiro "Matz" Matsumoto
02474daa14
allow '!' after 'S' specifier of mrb_get_args() that allow nil.
...
thus "S!" means String|nil type. you have to check nil before
dereferencing the value. this is added to address #2882 while
keeping code simplicity. besides that current #2882 fix lose
polymorphism provided by mrb_get_args().
2015-07-13 11:14:50 +09:00
Yukihiro "Matz" Matsumoto
9c311ddc93
refactor mrb_bob_missing to share raising NoMethodError code; fix #2878
...
Note: arguments of mrb_no_method_error() has changed. You need to replace
3rd and 4th argument (say n, argv) to mrb_ary_new_from_values(mrb, n, argv).
2015-07-13 11:07:59 +09:00
Yukihiro "Matz" Matsumoto
4dac03cb2d
Merge pull request #2883 from jbreeden/array_join_nil
...
Patching array join
2015-07-12 22:42:18 +09:00
jbreeden
dd558a108d
Removing unndeeded to_s
2015-07-11 21:15:33 -07:00
jbreeden
bdbd696c48
Patching array join
2015-07-11 21:03:04 -07:00
Yukihiro "Matz" Matsumoto
39dd182244
Merge pull request #2880 from mattn/llround
...
implement llround. some platform (ex: mingw32) doesn't have llround.
2015-07-09 14:57:29 +09:00
Yasuhiro Matsumoto
1167fd1ae4
use round for llround. some platform (ex: mingw32) doesn't have llround.
2015-07-09 11:02:34 +09:00
Yukihiro "Matz" Matsumoto
40252169fc
method_missing definition may be undefined; fix #2878
2015-07-07 10:32:54 +09:00
Yukihiro "Matz" Matsumoto
5cfc0d0dc0
Merge pull request #2877 from cremno/fix-dangling-ptr
...
Coverity: fix dangling pointer
2015-07-07 07:40:38 +09:00
Yukihiro "Matz" Matsumoto
5daabc9407
Merge pull request #2876 from joans321/master
...
fix androideabi cross-compile error : undefined reference to 'frexpl'
2015-07-07 00:36:51 +09:00
Yukihiro "Matz" Matsumoto
f1c6d6c866
Merge pull request #2875 from davydovanton/doc-comment-typo
...
Fix typo in comment in String#mrb_cstr_to_inum
2015-07-07 00:34:03 +09:00
xuejianqing
0b50b4a500
fix androideabi cross-compile error : undefined reference to 'frexpl'
2015-07-06 12:51:57 +08:00
Anton Davydov
03ae38df4e
Fix typo in comment in String#mrb_cstr_to_inum [skip ci]
2015-07-05 13:53:14 +03:00
Yukihiro "Matz" Matsumoto
e690e1e877
Merge pull request #2871 from archSeer/patch-2
...
Fix incorrect memory allocation of mrdb_state_new.
2015-07-03 15:05:29 +09:00
Yukihiro "Matz" Matsumoto
1dbb2b74d3
Merge pull request #2874 from cremno/fix-parser-oob-write
...
Coverity: fix oob write by actually truncating buffer
2015-07-03 15:03:45 +09:00
Yukihiro "Matz" Matsumoto
b071dcd4fb
Merge pull request #2873 from cremno/fix-coverity-missing-break-in-switch
...
Coverity: fix missing break in switch defects
2015-07-03 15:03:01 +09:00
cremno
7206a8c4f9
fix dangling pointer
...
CID 75872 (#3-2 of 3): Pointer to local outside scope (RETURN_LOCAL)
38. use_invalid: Using p, which points to an out-of-scope variable buf.
2015-07-03 02:48:22 +02:00
cremno
24583a7a18
fix oob write by actually truncating buffer
...
Found by Coverity scan of polyfox-moon:
CID 121927 (#1 of 1): Out-of-bounds write (OVERRUN)
2015-07-03 01:30:54 +02:00
cremno
43df1d7e39
remove unnecessary default case
2015-07-03 01:14:06 +02:00
cremno
6a74b8bf0d
add missing fall through comments
2015-07-02 22:11:21 +02:00
Blaž Hrastnik
a4f63caa79
Fix incorrect memory allocation of mrdb_state_new.
...
As detected in a Coverity scan. https://scan8.coverity.com/reports.htm#v26153/p11375/fileInstanceId=6844472&defectInstanceId=2516000&mergedDefectId=75866
2015-07-02 20:47:22 +02:00
Yukihiro "Matz" Matsumoto
ff49cf95fc
Merge pull request #2869 from cremno/refactor-print.c
...
src/print.c: rewrite printstr() to get rid of code duplication
2015-07-01 08:47:41 +09:00
Yukihiro "Matz" Matsumoto
18c82d5359
Merge pull request #2868 from sgnr/avoid-narrowing-cast-in-flo-round
...
Avoid a narrowing cast in flo_round under MRB_INT64.
2015-07-01 08:43:49 +09:00
Simon Génier
d6865a9cc7
Avoid a narrowing cast in flo_round under MRB_INT64.
2015-06-29 20:19:19 -04:00