Results for: "tally"

Installing a git gem only involves building the extensions and generating the executables.

This is a null install as this specification is already installed. options are ignored.

This is a null install as a locked specification is considered installed. options are ignored.

Installs this specification using the Gem::Installer options. The install method yields a Gem::Installer instance, which indicates the gem will be installed, or nil, which indicates the gem is already installed.

After installation spec is updated to point to the just-installed specification.

This is a null install as this gem was unpacked into a directory. options are ignored.

Starts tracing object allocations.

Calls the constructed Function, with args. Caller must ensure the underlying function is called in a thread-safe manner if running in a multi-threaded process.

Note that it is not thread-safe to use this method to directly or indirectly call many Ruby C-extension APIs unless you don’t pass +need_gvl: true+ to Fiddle::Function#new.

For an example see Fiddle::Function

Allocates a C struct with the types provided.

See Fiddle::Pointer.malloc for memory management issues.

Examples

# Automatically freeing the pointer when the block is exited - recommended
Fiddle::Pointer.malloc(size, Fiddle::RUBY_FREE) do |pointer|
  ...
end

# Manually freeing but relying on the garbage collector otherwise
pointer = Fiddle::Pointer.malloc(size, Fiddle::RUBY_FREE)
...
pointer.call_free

# Relying on the garbage collector - may lead to unlimited memory allocated before freeing any, but safe
pointer = Fiddle::Pointer.malloc(size, Fiddle::RUBY_FREE)
...

# Only manually freeing
pointer = Fiddle::Pointer.malloc(size)
begin
  ...
ensure
  Fiddle.free pointer
end

# No free function and no call to free - the native memory will leak if the pointer is garbage collected
pointer = Fiddle::Pointer.malloc(size)
...

Allocate size bytes of memory and associate it with an optional freefunc.

If a block is supplied, the pointer will be yielded to the block instead of being returned, and the return value of the block will be returned. A freefunc must be supplied if a block is.

If a freefunc is supplied it will be called once, when the pointer is garbage collected or when the block is left if a block is supplied or when the user calls call_free, whichever happens first. freefunc must be an address pointing to a function or an instance of Fiddle::Function.

Logs a message at the fatal (syslog err) log level, or logs the message returned from the block.

Returns all specifications. This method is discouraged from use. You probably want to use one of the Enumerable methods instead.

Sets the known specs to specs. Not guaranteed to work for you in the future. Use at your own risk. Caveat emptor. Doomy doom doom. Etc etc.

No documentation available

Returns true if the named file is writable by the real user and group id of this process. See access(3).

Note that some OS-level security features may cause this to return true even though the file is not writable by the real user/group.

Returns true if the named file is executable by the real user and group id of this process. See access(3).

Windows does not support execute permissions separately from read permissions. On Windows, a file is only considered executable if it ends in .bat, .cmd, .com, or .exe.

Note that some OS-level security features may cause this to return true even though the file is not executable by the real user/group.

Return true if the caused method was called as private.

Returns true if the given ordinal date is valid, and false if not.

Date.valid_ordinal?(2001,34)      #=> true
Date.valid_ordinal?(2001,366)     #=> false

See also ::jd and ::ordinal.

Returns true if the given week date is valid, and false if not.

Date.valid_commercial?(2001,5,6)  #=> true
Date.valid_commercial?(2001,5,8)  #=> false

See also ::jd and ::commercial.

No documentation available

Returns an array of all the symbols currently in Ruby’s symbol table.

Symbol.all_symbols.size    #=> 903
Symbol.all_symbols[1,20]   #=> [:floor, :ARGV, :Binding, :symlink,
                                :chown, :EOFError, :$;, :String,
                                :LOCK_SH, :"setuid?", :$<,
                                :default_proc, :compact, :extend,
                                :Tms, :getwd, :$=, :ThreadGroup,
                                :wait2, :$>]

See FileTest.executable_real?.

See FileTest.writable_real?.

Evaluates a string containing Ruby source code, or the given block, within the context of the receiver (obj). In order to set the context, the variable self is set to obj while the code is executing, giving the code access to obj’s instance variables and private methods.

When instance_eval is given a block, obj is also passed in as the block’s only argument.

When instance_eval is given a String, the optional second and third parameters supply a filename and starting line number that are used when reporting compilation errors.

class KlassWithSecret
  def initialize
    @secret = 99
  end
  private
  def the_secret
    "Ssssh! The secret is #{@secret}."
  end
end
k = KlassWithSecret.new
k.instance_eval { @secret }          #=> 99
k.instance_eval { the_secret }       #=> "Ssssh! The secret is 99."
k.instance_eval {|obj| obj == self } #=> true

Allow connections from Socket soc?

Allow connections from addrinfo addr? It must be formatted like Socket#peeraddr:

["AF_INET", 10, "lc630", "192.0.2.1"]
Search took: 7ms  ·  Total Results: 1166