Given a Ruby instance, will attempt to push it on the Lua stack.
3985
def stack_push(o)

      return stack_push(o.to_lua) if o.respond_to?(:to_lua)

      case o

      when NilClass then Lib.lua_pushnil(@pointer)

      when TrueClass then Lib.lua_pushboolean(@pointer, 1)
      when FalseClass then Lib.lua_pushboolean(@pointer, 0)

      when Integer then Lib.lua_pushinteger(@pointer, o)
      when Float then Lib.lua_pushnumber(@pointer, o)

      when String then Lib.lua_pushlstring(@pointer, o, o.bytesize)
      when Symbol then Lib.lua_pushlstring(@pointer, o.to_s, o.to_s.bytesize)

      when Hash then stack_push_hash(o)
      when Array then stack_push_array(o)

      else raise(
        ArgumentError.new(
          "don't know how to pass Ruby instance of #{o.class} to Lua"))
      end
    end
355202
def set
      unless stack = Codex.in(shift_argument)
        error("Usage: heroku stack:set STACK.\nMust specify target stack.")
      end

      api.put_stack(app, stack)
      display "Stack set. Next release on #{app} will use #{Codex.out(stack)}."
      display "Run `git push heroku master` to create a new release on #{Codex.out(stack)}."
    end
1276934
def stack_load_path(path)

      ps = path.split('.')

      stack_load_global(ps.shift)

      while ps.first
        stack_load_field(ps.shift)
        Lib.lua_remove(@pointer, -2)
      end
    end
1201248
def update_stack_list!
      if updater.nil? || !updater.alive?
        self.updater = Thread.new {
          loop do
            begin
              fetch_stacks
              sleep(stack_list_interval)
            rescue => e
              logger.error "Failure encountered on stack fetch: #{e.class} - #{e}"
            end
          end
        }
        true
      else
        false
      end
    end
976707
private final void push() {
    if (ptr >= stack.length) {
      // doubling here is probably overkill, but anything that needs to double more than
      // once (32 levels deep) is very atypical anyway.
      byte[] newstack = new byte[stack.length<<1];
      System.arraycopy(stack,0,newstack,0,stack.length);
      stack = newstack;
    }
    stack[ptr++] = state;
  }
913184
def run
      unless stack_exists?(@stack_name)
        puts "The stack #{@stack_name.color(:green)} does not exist."
        return
      end

      resp = cloudformation.describe_stacks(stack_name: @stack_name)
      stack = resp.stacks.first

      puts "The current status for the stack #{@stack_name.color(:green)} is #{stack.stack_status.color(:green)}"

      status_poller = Stack::Status.new(@stack_name)

      if stack.stack_status =~ /_IN_PROGRESS$/
        puts "Stack events (tailing):"
        # tail all events until done
        status_poller.hide_time_took = true
        status_poller.wait
      else
        puts "Stack events:"
        # show the last events that was user initiated
        status_poller.refresh_events
        status_poller.show_events(true)
      end
    end
490278
def push_scope(definition)
      unless definition.is_a?(RubyLint::Definition::RubyObject)
        raise(
          ArgumentError,
          "Expected a RubyLint::Definition::RubyObject but got " \
            "#{definition.class} instead"
        )
      end

      @scopes << definition
    end
497727
def push_buffer
      raise Shells::NotRunning unless running?
      # push the buffer so we can get the output of a command.
      debug 'Pushing buffer >>'
      sync do
        output_stack.push [ stdout, stderr, output ]
        self.stdout = ''
        self.stderr = ''
        self.output = ''
      end
    end
414177
def stack(options={}, &block)
      @stack ||= begin
        if block_given?
          Faraday::RackBuilder.new(&block)
        else
          Faraday::RackBuilder.new(&default_middleware(options))
        end
      end
    end
403642
def should_update(stack):
    
    if stack.locked:
        if not stack.force:
            logger.debug("Stack %s locked and not in --force list. "
                         "Refusing to update.", stack.name)
            return False
        else:
            logger.debug("Stack %s locked, but is in --force "
                         "list.", stack.name)
    return True
1259378
def build_call_chain(stack)
      # We need to instantiate the middleware stack in reverse
      # order so that each middleware can have a reference to
      # the next middleware it has to call. The final middleware
      # is always the empty middleware, which does nothing but return.
      stack.reverse.inject(EMPTY_MIDDLEWARE) do |next_middleware, current_middleware|
        # Unpack the actual item
        klass, args, block = current_middleware

        # Default the arguments to an empty array. Otherwise in Ruby 1.8
        # a `nil` args will actually pass `nil` into the class. Not what
        # we want!
        args ||= []

        if klass.is_a?(Class)
          # If the klass actually is a class, then instantiate it with
          # the app and any other arguments given.
          klass.new(next_middleware, *args, &block)
        elsif klass.respond_to?(:call)
          # Make it a lambda which calls the item then forwards up
          # the chain.
          lambda do |env|
            next_middleware.call(klass.call(env, *args))
          end
        else
          fail "Invalid middleware, doesn't respond to `call`: #{klass.inspect}"
        end
      end
    end
546501
def push(self, cf):
        
        cf.next = self
        if self.state is not None:
            self.state.register_plugin('callstack', cf)
            self.state.history.recent_stack_actions.append(CallStackAction(
                hash(cf), len(cf), 'push', callframe=cf.copy({}, with_tail=False)
            ))

        return cf
273245
def ruby(*args, &block)
      options = args.last.is_a?(Hash) ? args.pop : {}
      if args.length > 1
        run(*([RUBY] + args + [options]), &block)
      else
        run("#{RUBY} #{args.first}", options, &block)
      end
    end
294688
def with(&block)
      raise ArgumentError.new("Must pass a block") unless block_given?
      case block.arity
        when 1
          yield self
        when 0
          instance_methods_eval(&block)
        else
          raise "block arity must be 0 or 1"
      end
    end
178094
def stack_push_hash(h)

      Lib.lua_createtable(@pointer, 0, h.size)
        # since we already know the size of the table...

      h.each do |k, v|
        stack_push(k)
        stack_push(v)
        Lib.lua_settable(@pointer, -3)
      end
    end
629699
function attempt(fn){
		try {
			var args = _.from(arguments);
			args.shift();
			
			return fn.apply(this, args);
		} catch(e){
			return false;
		}
	}
607672
def push_only?
      chunks.each do |c|
        return false if !c.opcode.nil? && c.opcode > OP_16
      end
      true
    end