require_relative '../../spec_helper' describe "ObjectSpace.garbage_collect" do it "can be invoked without any exceptions" do -> { ObjectSpace.garbage_collect }.should_not raise_error end it "doesn't accept any arguments" do -> { ObjectSpace.garbage_collect(1) }.should raise_error(ArgumentError) end it "ignores the supplied block" do -> { ObjectSpace.garbage_collect {} }.should_not raise_error end it "always returns nil" do ObjectSpace.garbage_collect.should == nil ObjectSpace.garbage_collect.should == nil end end 27efbb'/> The Ruby Programming Language
summaryrefslogtreecommitdiff
path: root/test/ruby/test_encoding.rb
AgeCommit message (Collapse)Author
2021-02-16Fix a failureKazuhiro NISHIYAMA
http://ci.rvm.jp/results/trunk-test@ruby-sky1/3359644 ``` : 1) : TestEncoding#test_nonascii_library_path [/tmp/ruby/v3/src/trunk-test/test/ruby/test_encoding.rb:157]: : Exception(LoadError) with message matches to /\[Bug #16382\]/. ```
2020-10-15Check encoding name to replicateNobuyoshi Nakada
https://hackerone.com/reports/954433
2020-02-13Get rid of warnings/exceptions at cleanupNobuyoshi Nakada
After the encoding index instance variable is removed when all instance variables are removed in `obj_free`, then `rb_str_free` causes uninitialized instance variable warning and nil-to-integer conversion exception. Both cases result in object allocation during GC, and crashes.
2020-02-12Copy non-inlined encoding indexNobuyoshi Nakada
2020-02-12Make temporary lock string encoding freeNobuyoshi Nakada
As a temporary lock string is hidden, it can not have instance variables, including non-inlined encoding index.
2020-02-12Workaround of instance variable on hidden objectNobuyoshi Nakada
Since 9d9aea7fe50f6340829faa105d9ffe08ebaee658, generic instance variables need `iv_index_tbl` in the object's class. As hidden objects, however, have no class, access to the variables causes a segfault. Get rid of that segfault by raising an exception, for the time being.
2020-02-12Isolate the test for Encoding#replicateNobuyoshi Nakada
It has global side effect which cannot be reverted.
2020-01-28support multi-run for test/ruby/test_encoding.rbKoichi Sasada
Unique encoding name is required.
2019-12-03Fixed stack overflow [Bug #16382]Nobuyoshi Nakada
Get rid of infinite recursion in expanding a load path to the real path while loading a transcoder. Notes: Merged: https://github.com/ruby/ruby/pull/2714
2019-11-18Deprecate taint/trust and related methods, and make the methods no-opsJeremy Evans
This removes the related tests, and puts the related specs behind version guards. This affects all code in lib, including some libraries that may want to support older versions of Ruby. Notes: Merged: https://github.com/ruby/ruby/pull/2476