summaryrefslogtreecommitdiffhomepage
path: root/src/class.c
AgeCommit message (Collapse)Author
2017-05-30Avoid using C++ style comments (//).Yukihiro "Matz" Matsumoto
2017-05-29Mark proc objects representing methods as internal objects; fix #3621Yukihiro "Matz" Matsumoto
2017-05-26Add new range check macro FIXABLE_FLOAT(); ref #3652Yukihiro "Matz" Matsumoto
When MRB_INT64, valid value range of mrb_int is bigger than double, which only has 53 bits significant precision.
2017-04-21Add missing `arg_i++` to fix bug of `s!` in mrb_get_args.take_cheeze
2017-04-12Refactor check before `mrb_class_ptr()`; ref #3602Yukihiro "Matz" Matsumoto
2017-04-12The attached object may not be a class; fix #3602Yukihiro "Matz" Matsumoto
2017-04-06Get constant of parent class even if child class is defined in signleton ↵Kouichi Nakanishi
class; fix #3575
2017-04-03Unify `else` clause styleYukihiro "Matz" Matsumoto
2017-04-03Remove spaces around parensYukihiro "Matz" Matsumoto
2017-03-19`super class error` formats the superclass by `inspect`; rerf #3515Yukihiro "Matz" Matsumoto
2017-03-18Need to setup singleton_class chain; fix #3509Yukihiro "Matz" Matsumoto
2017-03-16Singleton classes do not have outer class set; fix #3505Yukihiro "Matz" Matsumoto
2017-03-10Raise special Exception when exception class is redefined; fix #3493Yukihiro "Matz" Matsumoto
2017-02-15Move #__id__ to BasicObject; ref #3417Yukihiro "Matz" Matsumoto
2017-02-15Move #instance_eval to BasicObject; ref #3417Yukihiro "Matz" Matsumoto
2017-02-15Move #__send__ to BasicObject; ref #3417Yukihiro "Matz" Matsumoto
2017-02-15Move #== and #!= to BasicObject; ref #3417Yukihiro "Matz" Matsumoto
2017-02-15Move BasicObject#method_missing to Kernel#method_missing; ref #3417Yukihiro "Matz" Matsumoto
More compatibility to CRuby. Updated tests that assume old mruby behavior.
2017-02-15Avoid calling hook methods if they are not overridden.Yukihiro "Matz" Matsumoto
2017-01-24Outer class may be same as the class; fix #3382Yukihiro "Matz" Matsumoto
2017-01-12Kernel#initialize should not break existing mt; fix #3397Yukihiro "Matz" Matsumoto
This issue was reported by https://hackerone.com/icanthack The solution is suggested by @clayton-shopify.
2017-01-11Raises Exception if raising exception class is redefinedYukihiro "Matz" Matsumoto
close #3384 This issue was reported by https://hackerone.com/brakhane
2016-12-12should not try to set classpath for frozen classes; ref #3340Yukihiro "Matz" Matsumoto
2016-12-12freeze classes/modules; ref #3340Yukihiro "Matz" Matsumoto
2016-12-04Add symbol type check for Module#undef_methodYukihiro "Matz" Matsumoto
2016-11-30Prohibit instantiation of immediate objectsYukihiro "Matz" Matsumoto
2016-11-24Fix segfault on remove_method with invalid argumentBouke van der Bijl
Reported by https://hackerone.com/jpenalbae
2016-11-17renamed "inline" to "istruct" to represent inline struct; ref #3251Yukihiro "Matz" Matsumoto
2016-11-17inline structures data type for mruby (MRB_TT_INLINE) (fix #3237)Tomasz Dąbrowski
Inline structures have no instance variables, no finalizer, and offer as much space as possible in RBASIC object. This means 24 bytes on 64-bit platforms and 12 bytes on 32-bit platforms. mruby-inline-struct gem is only provided for testing.
2016-11-16Correct argument specifications for few methods:Tomasz Dąbrowski
- Struct#values_at - Module#define_method - String#chop - String#chop!
2016-11-15class/module statement should re-open; fix #3225Yukihiro "Matz" Matsumoto
2016-11-13move mrb_str_dup() to mrb_class_path; ref #2470Yukihiro "Matz" Matsumoto
Class#to_s used to return same string repeatedly, that mean you can modify "class name" by modifying the return value from Class#to_s.
2016-11-11Merge pull request #3224 from ksss/define_methodYukihiro "Matz" Matsumoto
Module#define_method supports proc argument
2016-11-10Renamed class_under_defined to class_defined_underFelix Jones
2016-11-06Added mrb_class_under_definedFelix Jones
2016-10-12Module#define_method supports proc argumentksss
2016-08-20Move Module#include and #prepend to class.c; ref #3197Yukihiro "Matz" Matsumoto
To avoid VM nesting with mrb_funcall()
2016-02-24Avoid Error when Compiling with -std=c99 flagMalizia R
2016-01-22Fix SEGV by stack extension in mrb_get_args()Kouhei Sutou
mrb_get_args() keeps pointer of the current stack. But address of the current stack maybe changed by method call. 'i' format character calls #to_i when the argument isn't integer but has #to_i. Here is a code that may call #to_i in mrb_get_args(): case 'i': // ... default: *p = mrb_fixnum(mrb_Integer(mrb, ARGV[arg_i])); break; // ... Here is a code #to_i is called: class X def initialize(i) @i = i end def to_i @i end end [][X.new(0), 0] # X#to_i is called So, mrb_get_args() shouldn't keep pointer and use it. mrb_get_args() should always refer mrb->ci->stack to use valid address of the current stack.
2015-11-27include changed from by quotes ("") to by brackets (<>); close #3032Yukihiro "Matz" Matsumoto
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