summaryrefslogtreecommitdiffhomepage
path: root/src/class.c
AgeCommit message (Collapse)Author
2015-10-28mrb_get_args should consume argument even when type specifier with bang get ↵Yukihiro "Matz" Matsumoto
nil; fix #3002
2015-09-05remove `origin` member to implement prepend from struct RClass; ref #2885Yukihiro "Matz" Matsumoto
instead origin is saved in ICLASS with MRB_FLAG_IS_ORIGIN set.
2015-09-04Merge branch 'module-prepend' of https://github.com/polyfox/mruby into ↵Yukihiro "Matz" Matsumoto
polyfox-module-prepend
2015-07-16Make include_module_at staticCorey Powell
Since I can't forsee any reason to use it directly inplace of using prepend/include
2015-07-16use mrb_str_cat_str() instead of mrb_str_append()cremno
If the argument is always a string, then mrb_str_cat_str() can be directly called instead of indirectly by mrb_str_append(). mrb_any_to_s(), mrb_obj_as_string(), mrb_inspect() always return a string.
2015-07-14Remove non-applicable "hack" commentCorey Powell
2015-07-14Applied gc patch to fix ORIGIN ICLASS method table leakCorey Powell
Based on the gc patch by ko1 https://github.com/ruby/ruby/commit/5922c954614e5947a548780bb3b894626affe6dd
2015-07-14Renamed parameters in include_module_atCorey Powell
2015-07-14mrb_get_args: improve function description about !Yukihiro "Matz" Matsumoto
2015-07-14mrb_get_args: allow d!Yukihiro "Matz" Matsumoto
2015-07-14mrb_get_args: allow A,H,s,z,a,d specifiers to take ! to accept nil.Yukihiro "Matz" Matsumoto
S,A,H gives nil, s,z,a,d gives NULL for nil argument. ref 02474da
2015-07-13included_modules, origin fixCorey Powell
Prepended modules would include their origin ICLASS
2015-07-13Bugfix, included_modules would include classesCorey Powell
2015-07-13Removed comment beside method_removedCorey Powell
Not sure if this apart of the ISO standard, so make sure its not misrepresented
2015-07-13Added Module#method_removed hookCorey Powell
2015-07-13Fixed Modules not being fully initialized before #initialize was calledCorey Powell
2015-07-13Added changed check to the mrb_include_moduleCorey Powell
2015-07-13Remove some remnant debug codeCorey Powell
2015-07-13Additional patches to make this workCorey Powell
2015-07-13Comment in a refactor to match MRI, but that fails 320 tests.Blaž Hrastnik
2015-07-13origin must be initializedBlaž Hrastnik
2015-07-13Expose insert position, which should be at origin for include and klass forBlaž Hrastnik
prepend.
2015-07-13Implement Module#prepend.Blaž Hrastnik
2015-07-13allow '!' after 'S' specifier of mrb_get_args() that allow nil.Yukihiro "Matz" Matsumoto
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-13refactor mrb_bob_missing to share raising NoMethodError code; fix #2878Yukihiro "Matz" Matsumoto
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-06-24Remove unnecessary backticks.Franck Verrot
Dr Markus Kuhn published in 1999 an article [1] explaining in details why we shouldn't use the ASCII grave accent (0x60) as a left quotation. Backticks have been used most notably to produce nice-looking LaTeX documents but it doesn't seem to be an issue on modern platforms and for the oldest ones, there are workarounds as mentioned by Dr Kuhn. [1]: https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
2015-06-22Fixes #912Jared Breeden
2015-05-29check if outer is a class or modulecremno
For modules this check didn't exist yet. Also call #inspect.
2015-05-28remove unnecessary including of <ctype.h>cremno
Not needed anymore since 85075bef7583edd0a48cfbdfaa632cbdacf78f2c
2015-05-15remove mrb_define_method_vm() functioncremno
It isn't needed as it's very similar to mrb_define_method_raw() and also there's only one place where mrb_proc_ptr() actually has to be called. Inspired by @furunkel's method cache patch (#2764).
2014-12-12Fix crash if #inspect does not return a string valuesdottaka
case 1 ~~~ class A; def inspect; 1; end; end A.new.a ~~~ case 2 ~~~ class A def self.inspect 1 end alias_method :a, :b end ~~~
2014-11-19separate mrb_notimplement() and mrb_notimplement_m(); ref #2636Yukihiro "Matz" Matsumoto
2014-11-17fix mrb_notimplement typoRobert Mosolgo
2014-11-17Implement C API mrb_notimplementksss
2014-09-21Fix `mrb_get_args` arguments types found by mruby-clang-plugin.take_cheeze
2014-09-19code reduce by using mrb_get_args("n")Yukihiro "Matz" Matsumoto
2014-09-19`Module#const_defined?` to take second optional argument as CRuby; fix #2593Yukihiro "Matz" Matsumoto
2014-09-19change class argument of mrb_const_defined_at from `struct RClass*` to ↵Yukihiro "Matz" Matsumoto
`mrb_value` to make it consistent with mrb_const_defined; ref #2593
2014-09-03Merge pull request #2582 from iij/pr-attr-accessor-save-arenaYukihiro "Matz" Matsumoto
save and restore arena index to prevent arena overflow.
2014-09-03save and restore arena index to prevent arena overflow.Tomoyuki Sahara
2014-09-03Use mrb_str_cat_lit() instead of mrb_str_cat_cstr() for string-literals.Tatsuhiko Kubo
2014-09-02implement attr_reader and attr_writer in C; use cfunc closure to speed-upYukihiro "Matz" Matsumoto
2014-08-29Fix mismatches for MRB_API declarations.Tatsuhiko Kubo
2014-08-21changed to call check_cv_name_str in check_cv_name_sym and adjust indentkkkkkt
2014-08-20Remove empty lines.Tatsuhiko Kubo
2014-08-20Use specified macro(NULL) instead of magic-number.Tatsuhiko Kubo
2014-08-16use mrb_false_value instead of mrb_bool_valuego kikuta
2014-08-16refactor class.c methods (fix indent, remove unneed temp value. )go kikuta
2014-08-04add MRB_API modifiers to mruby API functionsYukihiro "Matz" Matsumoto
2014-07-18add Module#module_functiondreamedge