aboutsummaryrefslogtreecommitdiffstats
path: root/object.c
Commit message (Collapse)AuthorAgeFilesLines
* Use predefined IDsNobuyoshi Nakada2021-07-271-2/+2
|
* Use RB_INTEGER_TYPE_PNobuyoshi Nakada2021-07-201-2/+1
|
* Make boolean expected messages more consitentNobuyoshi Nakada2021-07-181-1/+1
|
* Constified a local tableNobuyoshi Nakada2021-07-181-1/+1
|
* Add Integer.try_convert [Feature #15211]Nobuyoshi Nakada2021-07-161-3/+13
|
* Move rb_str_escape function declarationS-H-GAMELINKS2021-07-111-1/+1
|
* Specify version to remove as bare numbersNobuyoshi Nakada2021-06-301-7/+7
|
* rb_warn_deprecated_to_remove_at [Feature #17432]Nobuyoshi Nakada2021-06-301-7/+7
| | | | | At compilation time with RUBY_DEBUG enabled, check if the removal version has been reached.
* Share freeze option handlingNobuyoshi Nakada2021-06-281-7/+7
|
* Adjust styles [ci skip]Nobuyoshi Nakada2021-06-171-1/+1
| | | | | | | | | * --braces-after-func-def-line * --dont-cuddle-else * --procnames-start-lines * --space-after-for * --space-after-if * --space-after-while
* Implemented some NilClass method in Ruby code is faster [Feature #17054] (#3366)S.H2021-06-021-33/+1
|
* Object whats here (#4503)Burdette Lamar2021-05-181-0/+84
| | | What's Here section for class Object.
* What's Here for BasicObject (#4499)Burdette Lamar2021-05-131-0/+25
| | | | * What's Here for BasicObject
* What's Here for Kernel (#4488)Burdette Lamar2021-05-131-0/+133
|
* Eagerly allocate instance variable tables along with objectAaron Patterson2021-05-031-13/+22
| | | | | | | | This allows us to allocate the right size for the object in advance, meaning that we don't have to pay the cost of ivar table extension later. The idea is that if an object type ever became "extended" at some point, then it is very likely it will become extended again. So we may as well allocate the ivar table up front.
* [Doc] Update to FrozenError from RuntimeError in Object#freezeKenichi Kamiya2021-04-011-1/+1
|
* [DOC] Modified prefixes to get rid of conflictsNobuyoshi Nakada2021-02-071-14/+14
|
* [DOC] make individual names so that rdoc can find each documentsNobuyoshi Nakada2021-02-071-11/+22
|
* [DOC] Module#method_undefinedNobuyoshi Nakada2021-02-071-0/+26
|
* [DOC] Fix typosMarcus Stollsteimer2020-12-241-4/+4
|
* rb_cData: no longer exists卜部昌平2020-12-221-1/+0
| | | | | | | | | | | Commit 8918a9cf6c65409ae1ffcdea324a1b97c6e5bb70 introduced macro `#define rb_cData rb_cData()`. This deleting `VALUE rb_cData;` declaration was then macro-expanded into `VALUE rb_cData();`. This worked by accident because the expanded expression happen to be a K&R style function declaration. This is rather complicated and I guess unintended. Just delete the line to keep things simple straight forward.
* Removed rb_cData entityNobuyoshi Nakada2020-12-221-22/+0
| | | | | | | * Use the wrapper of rb_cObject instead of data access * Replaced rest of extentions * Updated the version guard for Data * Added the version guard of rb_cData
* Data: delete卜部昌平2020-12-221-9/+21
| | | | | | | | Has been deprecated since 684bdf6171b76f5bc5e4f05926a5ab01ec2b4fd5. Matz says in [ruby-core:83954] that Data should be an alias of Object. Because rb_cData has not been deprecated, let us deprecate the constant to make it a C-level synonym of rb_cObject.
* Use rb_id_attrset without intermediate stringsNobuyoshi Nakada2020-12-191-1/+1
|
* Feature 17314: update docs and NEWS about attr* methods returning array of ↵Radosław Bułat2020-12-191-12/+12
| | | | symbols
* Revert "Revert "Use rb_id_attrset without intermediate strings""Yusuke Endoh2020-12-191-4/+3
| | | | | | This reverts commit 41c208d4a463183fddca250026e5f1cd759d2604. Reintroduce 66090b9d10cdaed917b525225e59d1c19e399248.
* attr_reader, attr_writer, attr_accessor and attr methods returns array of ↵Radosław Bułat2020-12-191-9/+30
| | | | | symbols (#3935) Co-authored-by: Yusuke Endoh <mame@ruby-lang.org>
* Use category: :deprecated in warnings that are related to deprecationJeremy Evans2020-12-181-2/+2
| | | | | | | | | | | | | | | | | Also document that both :deprecated and :experimental are supported :category option values. The locations where warnings were marked as deprecation warnings was previously reviewed by shyouhei. Comment a couple locations where deprecation warnings should probably be used but are not currently used because deprecation warning enablement has not occurred at the time they are called (RUBY_FREE_MIN, RUBY_HEAP_MIN_SLOTS, -K). Add assert_deprecated_warn to test assertions. Use this to simplify some tests, and fix failing tests after marking some warnings with deprecated category.
* Revert "Better cooperation between public/protected/private with attr* and ↵Yusuke Endoh2020-12-181-41/+20
| | | | | | alias_method" This reverts commit 81739ad4fdfcc86a769056fec352f27c686fba1b.
* Revert "Use rb_id_attrset without intermediate strings"Yusuke Endoh2020-12-181-3/+4
| | | | This reverts commit 66090b9d10cdaed917b525225e59d1c19e399248.
* Use rb_id_attrset without intermediate stringsNobuyoshi Nakada2020-12-181-4/+3
|
* Better cooperation between public/protected/private with attr* and alias_methodRadosław Bułat2020-12-171-20/+41
|
* [DOC] Described "numeric representation" more precisely [ci skip]Nobuyoshi Nakada2020-12-161-2/+4
| | | | [Bug #17395]
* Protoized old pre-ANSI K&R style definitionsNobuyoshi Nakada2020-12-051-1/+1
|
* `dest` is always embedded so we can remove this checkAaron Patterson2020-10-281-6/+3
|
* Don't redefine #rb_intern over and over againStefan Stüben2020-10-211-3/+0
|
* remove rb_obj_iv_index_tblKoichi Sasada2020-10-171-8/+0
| | | | | (1) nobody uses it (gem-codesearch) (2) the data strucuture will be changed.
* Improve doc in rb_class_real doc (#3637)S.H2020-10-101-1/+1
|
* Initialize new T_OBJECT as ROBJECT_EMBEDJohn Hawthorn2020-09-021-7/+0
| | | | | | | | | | | | | | | | | | | | | | Previously, when an object is first initialized, ROBJECT_EMBED isn't set. This means that for brand new objects, ROBJECT_NUMIV(obj) is 0 and ROBJECT_IV_INDEX_TBL(obj) is NULL. Previously, this combination meant that the inline cache would never be initialized when setting an ivar on an object for the first time since iv_index_tbl was NULL, and if it were it would never be used because ROBJECT_NUMIV was 0. Both cases always fell through to the generic rb_ivar_set which would then set the ROBJECT_EMBED flag and initialize the ivar array. This commit changes rb_class_allocate_instance to set the ROBJECT_EMBED flag on the object initially and to initialize all members of the embedded array to Qundef. This allows the inline cache to be set correctly on first use and to be used on future uses. This moves rb_class_allocate_instance to gc.c, so that it has access to newobj_of. This seems appropriate given that there are other allocating methods in this file (ex. rb_data_object_wrap, rb_imemo_new).
* ROBJECT_IV_INDEX_TBL: convert into an inline function卜部昌平2020-08-191-0/+8
| | | | | | | Former ROBJECT_IV_INDEX_TBL macro included RCLASS_IV_INDEX_TBL, which is not disclosed to extension libraies. The macro was kind of broken. Why not just deprecate it, and convert the internal use into an inline function.
* [skip-ci] Clarification for dup vs clone docsEspartaco Palma2020-07-301-3/+3
| | | | | | | Both clone & dup returns a new object when executed on the documentation looks like they are returning the same object cloned or dup'ed which is true for method as extend, but not for the above mentioned.
* inline Primitive.cexpr!卜部昌平2020-07-131-1/+1
| | | | | We can obtain the verbatim source code of Primitive.cexpr!. Why not paste that content into the JITed program.
* Make Kernel#then, #yield_self, #frozen? builtin (#3283)Takashi Kokubun2020-07-031-53/+2
| | | | | * Make Kernel#then, #yield_self, #frozen? builtin * Fix test_jit
* Rewrite Kernel#tap with Ruby (#3281)Takashi Kokubun2020-07-031-26/+0
| | | | | | | | | | | | * Rewrite Kernel#tap with Ruby This was good for VM too, but of course my intention is to unblock JIT's inlining of a block over yield (inlining invokeyield has not been committed though). * Fix test_settracefunc About the :tap deletions, the :tap events are actually traced (we already have a TracePoint test for builtin methods), but it's filtered out by tp.path == "xyzzy" (it became "<internal:kernel>"). We could trace tp.path == "<internal:kernel>" cases too, but the lineno is impacted by kernel.rb changes and I didn't want to make it fragile for kernel.rb lineno changes.
* add UNREACHABLE_RETURN卜部昌平2020-06-291-1/+6
| | | | | | Not every compilers understand that rb_raise does not return. When a function does not end with a return statement, such compilers can issue warnings. We would better tell them about reachabilities.
* rb_cstr_to_dbl_raise: do not goto into a branch卜部昌平2020-06-291-7/+9
| | | | | I'm not necessarily against every goto in general, but jumping into a branch is definitely a bad idea. Better refactor.
* rb_convert_to_integer: do not goto into a branch卜部昌平2020-06-291-12/+14
| | | | | I'm not necessarily against every goto in general, but jumping into a branch is definitely a bad idea. Better refactor.
* rb_mod_const_location: do not goto into a branch卜部昌平2020-06-291-2/+4
| | | | | I'm not necessarily against every goto in general, but jumping into a branch is definitely a bad idea. Better refactor.
* rb_mod_const_defined: do not goto into a branch卜部昌平2020-06-291-2/+4
| | | | | I'm not necessarily against every goto in general, but jumping into a branch is definitely a bad idea. Better refactor.
* rb_mod_const_get: do not goto into a branch卜部昌平2020-06-291-2/+4
| | | | | I'm not necessarily against every goto in general, but jumping into a branch is definitely a bad idea. Better refactor.