PHP 8.2.31
Preview: allocate-i.yaml Size: 665 B
/proc/thread-self/root/opt/alt/ruby18/share/ri/1.8/system/Class/allocate-i.yaml

--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Allocates space for a new object of <em>class</em>'s class and does not call initialize on the new instance. The returned object must be an instance of <em>class</em>.
- !ruby/struct:SM::Flow::VERB 
  body: "    klass = Class.new do\n      def initialize(*args)\n        @initialized = true\n      end\n\n      def initialized?\n        @initialized || false\n      end\n    end\n\n    klass.allocate.initialized? #=&gt; false\n"
full_name: Class#allocate
is_singleton: false
name: allocate
params: |
  class.allocate()   =>   obj

visibility: public

Directory Contents

Dirs: 0 × Files: 7

Name Size Perms Modified Actions
665 B lrw-r--r-- 2023-07-26 13:47:18
Edit Download
2.45 KB lrw-r--r-- 2023-07-26 13:47:18
Edit Download
710 B lrw-r--r-- 2023-07-26 13:47:18
Edit Download
429 B lrw-r--r-- 2023-07-26 13:47:18
Edit Download
477 B lrw-r--r-- 2023-07-26 13:47:18
Edit Download
460 B lrw-r--r-- 2023-07-26 13:47:18
Edit Download
178 B lrw-r--r-- 2023-07-26 13:47:18
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).