Sha256: 208b027644aea20ab12dbdd2aaba9665ffc7e238811396e369a4e069bc0e8a3c

Contents?: true

Size: 793 Bytes

Versions: 1

Compression:

Stored size: 793 Bytes

Contents

class Rubinius CompiledMethod {
  forwards_unary_ruby_methods

  def selectors_with_args {
    local_names = local_names to_a
    if: (required_args > 0) then: {
      name to_s split: ":" . map_with_index: |sel i| {
        "#{sel}: #{local_names[i]}"
      } . join: " "
    } else: {
      name to_s rest
    }
  }

  def definition_line {
    # don't use documentation#to_s since we need original docstring as written in source file to calculate the correct lines#
    docstring = ""
    if: documentation then: {
      docstring = documentation docs join: "\n"
    }
    if: (lines size > 3) then: {
      lines[3] - (docstring lines size)
    } else: {
      0 # UNKNOWN?
    }
  }

  def last_line {
    defined_line
  }
}

class Rubinius CompiledCode {
  forwards_unary_ruby_methods
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fancy-0.10.0 lib/rbx/compiled_method.fy