Merge branch 'main' into rb/summarize-loads-v2

This commit is contained in:
Asger F
2022-09-29 12:07:30 +02:00
210 changed files with 1395 additions and 7743 deletions

View File

@@ -0,0 +1,5 @@
---
category: minorAnalysis
---
* `MethodBase` now has two new predicates related to visibility: `isPublic` and
`isProtected`. These hold, respectively, if the method is public or protected.

View File

@@ -0,0 +1,6 @@
---
category: minorAnalysis
---
* Various code executions, command executions and HTTP requests in the
ActiveStorage library are now recognized.

View File

@@ -0,0 +1,5 @@
---
category: minorAnalysis
---
* Calls to `ActiveRecord::Base.create` are now recognized as model
instantiations.

View File

@@ -36,58 +36,121 @@ class MethodBase extends Callable, BodyStmt, Scope, TMethodBase {
result = BodyStmt.super.getAChild(pred)
}
/**
* Holds if this method is public.
* Methods are public by default.
*/
predicate isPublic() { this.getVisibility() = "public" }
/** Holds if this method is private. */
predicate isPrivate() { none() }
predicate isPrivate() { this.getVisibility() = "private" }
/** Holds if this method is protected. */
predicate isProtected() { this.getVisibility() = "protected" }
/**
* Gets a string describing the visibility of this method.
* This is either 'public', 'private' or 'protected'.
*/
string getVisibility() {
result = getVisibilityModifier(this).getVisibility()
or
not exists(getVisibilityModifier(this)) and result = "public"
}
}
/**
* A method call which modifies another method in some way.
* Gets the visibility modifier that explicitly sets the visibility of method
* `m`.
*
* Examples:
* ```rb
* def f
* end
* private :f
*
* private def g
* end
* ```
*/
private VisibilityModifier getExplicitVisibilityModifier(Method m) {
result.getMethodArgument() = m
or
exists(ModuleBase n, string name |
methodIsDeclaredIn(m, n, name) and
modifiesIn(result, n, name)
)
}
/**
* Gets the visibility modifier that defines the visibility of method `m`, if
* any.
*/
private VisibilityModifier getVisibilityModifier(MethodBase mb) {
mb =
any(Method m |
result = getExplicitVisibilityModifier(m)
or
not exists(getExplicitVisibilityModifier(m)) and
exists(ModuleBase n, int methodPos | isDeclaredIn(m, n, methodPos) |
// The relevant visibility modifier is the closest call that occurs before
// the definition of `m` (typically this means higher up the file).
result =
max(int modifierPos, VisibilityModifier modifier |
modifier.modifiesAmbientVisibility() and
isDeclaredIn(modifier, n, modifierPos) and
modifierPos < methodPos
|
modifier order by modifierPos
)
)
)
or
mb =
any(SingletonMethod m |
result.getMethodArgument() = m
or
exists(ModuleBase n, string name |
methodIsDeclaredIn(m, n, name) and
modifiesIn(result, n, name)
)
)
}
/**
* A method call that sets the visibility of other methods.
* For example, `private :foo` makes the method `foo` private.
*/
private class MethodModifier extends MethodCall {
private class VisibilityModifier extends MethodCall {
VisibilityModifier() {
this.getMethodName() =
["public", "private", "protected", "public_class_method", "private_class_method"]
}
/** Gets the name of the method that this call applies to. */
Expr getMethodArgument() { result = this.getArgument(0) }
/** Holds if this call modifies a method with name `name` in namespace `n`. */
pragma[noinline]
predicate modifiesMethod(Namespace n, string name) {
this = n.getAStmt() and
[
this.getMethodArgument().getConstantValue().getStringlikeValue(),
this.getMethodArgument().(MethodBase).getName()
] = name
/**
* Holds if this modifier changes the "ambient" visibility - i.e. the default
* visibility of any subsequent method definitions.
*/
predicate modifiesAmbientVisibility() {
this.getMethodName() = ["public", "private", "protected"] and
this.getNumberOfArguments() = 0
}
}
/** A call to `private` or `private_class_method`. */
private class Private extends MethodModifier {
private Namespace namespace;
private int position;
Private() { this.getMethodName() = "private" and namespace.getStmt(position) = this }
override predicate modifiesMethod(Namespace n, string name) {
n = namespace and
(
// def foo
// ...
// private :foo
super.modifiesMethod(n, name)
or
// private
// ...
// def foo
not exists(this.getMethodArgument()) and
exists(MethodBase m, int i | n.getStmt(i) = m and m.getName() = name and i > position)
)
/** Gets the visibility set by this modifier. */
string getVisibility() {
this.getMethodName() = ["public", "public_class_method"] and result = "public"
or
this.getMethodName() = ["private", "private_class_method"] and
result = "private"
or
this.getMethodName() = "protected" and
result = "protected"
}
}
/** A call to `private_class_method`. */
private class PrivateClassMethod extends MethodModifier {
PrivateClassMethod() { this.getMethodName() = "private_class_method" }
}
/** A normal method. */
class Method extends MethodBase, TMethod {
private Ruby::Method g;
@@ -139,29 +202,49 @@ class Method extends MethodBase, TMethod {
* end
* ```
*/
override predicate isPrivate() {
exists(Namespace n, string name |
any(Private p).modifiesMethod(n, name) and
isDeclaredIn(this, n, name)
)
or
// Top-level methods are private members of the Object class
this.getEnclosingModule() instanceof Toplevel
}
override predicate isPrivate() { super.isPrivate() }
final override Parameter getParameter(int n) {
toGenerated(result) = g.getParameters().getChild(n)
}
final override string toString() { result = this.getName() }
override string getVisibility() {
result = getVisibilityModifier(this).getVisibility()
or
this.getEnclosingModule() instanceof Toplevel and
not exists(getVisibilityModifier(this)) and
result = "private"
or
not this.getEnclosingModule() instanceof Toplevel and
not exists(getVisibilityModifier(this)) and
result = "public"
}
}
pragma[nomagic]
private predicate modifiesIn(VisibilityModifier vm, ModuleBase n, string name) {
n = vm.getEnclosingModule() and
name = vm.getMethodArgument().getConstantValue().getStringlikeValue()
}
/**
* Holds if the method `m` has name `name` and is declared in namespace `n`.
* Holds if statement `s` is declared in namespace `n` at position `pos`.
*/
pragma[noinline]
private predicate isDeclaredIn(MethodBase m, Namespace n, string name) {
n = m.getEnclosingModule() and name = m.getName()
pragma[nomagic]
private predicate isDeclaredIn(Stmt s, ModuleBase n, int pos) {
n = s.getEnclosingModule() and
n.getStmt(pos) = s
}
/**
* Holds if method `m` with name `name` is declared in namespace `n`.
*/
pragma[nomagic]
private predicate methodIsDeclaredIn(MethodBase m, ModuleBase n, string name) {
isDeclaredIn(m, n, _) and
name = m.getName()
}
/** A singleton method. */
@@ -216,12 +299,7 @@ class SingletonMethod extends MethodBase, TSingletonMethod {
* end
* ```
*/
override predicate isPrivate() {
exists(Namespace n, string name |
any(PrivateClassMethod p).modifiesMethod(n, name) and
isDeclaredIn(this, n, name)
)
}
override predicate isPrivate() { super.isPrivate() }
}
/**

View File

@@ -132,6 +132,9 @@ module Rbi {
}
}
/**
* A use of `T::Hash`.
*/
class RbiHashType extends RbiType, ConstantReadAccessFromT {
RbiHashType() { this.getName() = "Hash" }
@@ -144,6 +147,11 @@ module Rbi {
Expr getValueType() { result = this.getRefNode().getArgument(1) }
}
/** A type instantiated with type arguments, such as `T::Array[String]`. */
class RbiInstantiatedType extends RbiType, ElementReference {
RbiInstantiatedType() { this.getReceiver() instanceof RbiType }
}
/**
* A call to `T.proc`. This defines a type signature for a proc or block
*/

View File

@@ -255,7 +255,7 @@ private string staticFinderMethodName() {
result = baseName + ["", "!"]
)
or
result = "new"
result = ["new", "create"]
}
// Gets the "final" receiver in a chain of method calls.
@@ -528,13 +528,17 @@ private module Persistence {
* end
* ```
*/
private class ActiveRecordAssociation extends DataFlow::CallNode {
class ActiveRecordAssociation extends DataFlow::CallNode {
private ActiveRecordModelClass modelClass;
ActiveRecordAssociation() {
not exists(this.asExpr().getExpr().getEnclosingMethod()) and
this.asExpr().getExpr().getEnclosingModule() = modelClass and
this.getMethodName() = ["has_one", "has_many", "belongs_to", "has_and_belongs_to_many"]
this.getMethodName() =
[
"has_one", "has_many", "belongs_to", "has_and_belongs_to_many", "has_one_attached",
"has_many_attached"
]
}
/**
@@ -584,21 +588,32 @@ private class ActiveRecordAssociation extends DataFlow::CallNode {
}
/** Holds if this association is one-to-one */
predicate isSingular() { this.getMethodName() = ["has_one", "belongs_to"] }
predicate isSingular() { this.getMethodName() = ["has_one", "belongs_to", "has_one_attached"] }
/** Holds if this association is one-to-many or many-to-many */
predicate isCollection() { this.getMethodName() = ["has_many", "has_and_belongs_to_many"] }
predicate isCollection() {
this.getMethodName() = ["has_many", "has_and_belongs_to_many", "has_many_attached"]
}
}
/**
* Converts `input` to plural form.
*
* Examples:
*
* - photo -> photos
* - story -> stories
* - photos -> photos
*/
bindingset[input]
bindingset[result]
private string pluralize(string input) {
exists(string stem | stem + "y" = input | result = stem + "ies")
or
not exists(string stem | stem + "s" = input) and
result = input + "s"
or
exists(string stem | stem + "s" = input) and result = input
}
/**

View File

@@ -8,23 +8,218 @@ private import codeql.ruby.Concepts
private import codeql.ruby.DataFlow
private import codeql.ruby.dataflow.FlowSummary
private import codeql.ruby.frameworks.data.ModelsAsData
private import codeql.ruby.frameworks.ActiveRecord
/** A call to `ActiveStorage::Filename#sanitized`, considered as a path sanitizer. */
class ActiveStorageFilenameSanitizedCall extends Path::PathSanitization::Range, DataFlow::CallNode {
ActiveStorageFilenameSanitizedCall() {
this.getReceiver() =
API::getTopLevelMember("ActiveStorage").getMember("Filename").getAnInstantiation() and
this.getMethodName() = "sanitized"
}
}
/** Taint related to `ActiveStorage::Filename`. */
private class Summaries extends ModelInput::SummaryModelCsv {
override predicate row(string row) {
row =
[
"activestorage;;Member[ActiveStorage].Member[Filename].Method[new];Argument[0];ReturnValue;taint",
"activestorage;;Member[ActiveStorage].Member[Filename].Instance.Method[sanitized];Argument[self];ReturnValue;taint",
]
/**
* Provides modeling for the `ActiveStorage` library.
* Version: 7.0.
*/
module ActiveStorage {
/** A call to `ActiveStorage::Filename#sanitized`, considered as a path sanitizer. */
private class FilenameSanitizedCall extends Path::PathSanitization::Range, DataFlow::CallNode {
FilenameSanitizedCall() {
this =
API::getTopLevelMember("ActiveStorage")
.getMember("Filename")
.getInstance()
.getAMethodCall("sanitized")
}
}
/** Taint related to `ActiveStorage::Filename`. */
private class FilenameSummaries extends ModelInput::SummaryModelCsv {
override predicate row(string row) {
row =
[
"activestorage;;Member[ActiveStorage].Member[Filename].Method[new];Argument[0];ReturnValue;taint",
"activestorage;;Member[ActiveStorage].Member[Filename].Instance.Method[sanitized];Argument[self];ReturnValue;taint",
]
}
}
/**
* `Blob` is an instance of `ActiveStorage::Blob`.
*/
private class BlobTypeSummary extends ModelInput::TypeModelCsv {
override predicate row(string row) {
// package1;type1;package2;type2;path
row =
[
// ActiveStorage::Blob.new : Blob
"activestorage;Blob;activestorage;;Member[ActiveStorage].Member[Blob].Instance",
// ActiveStorage::Blob.create_and_upload! : Blob
"activestorage;Blob;activestorage;;Member[ActiveStorage].Member[Blob].Method[create_and_upload!].ReturnValue",
// ActiveStorage::Blob.create_before_direct_upload! : Blob
"activestorage;Blob;activestorage;;Member[ActiveStorage].Member[Blob].Method[create_before_direct_upload!].ReturnValue",
// ActiveStorage::Blob.compose(blobs : [Blob]) : Blob
"activestorage;Blob;activestorage;;Member[ActiveStorage].Member[Blob].Method[compose].ReturnValue",
// gives error: Invalid name 'Element' in access path
// "activestorage;Blob;activestorage;;Member[ActiveStorage].Member[Blob].Method[compose].Argument[0].Element[any]",
// ActiveStorage::Blob.find_signed(!) : Blob
"activestorage;Blob;activestorage;;Member[ActiveStorage].Member[Blob].Method[find_signed,find_signed!].ReturnValue",
]
}
}
private class BlobInstance extends DataFlow::Node {
BlobInstance() {
this = ModelOutput::getATypeNode("activestorage", "Blob").getAValueReachableFromSource()
or
// ActiveStorage::Attachment#blob : Blob
exists(DataFlow::CallNode call |
call = this and
call.getReceiver() instanceof AttachmentInstance and
call.getMethodName() = "blob"
)
or
// ActiveStorage::Attachment delegates method calls to its associated Blob
this instanceof AttachmentInstance
}
}
/**
* Method calls on `ActiveStorage::Blob` that send HTTP requests.
*/
private class BlobRequestCall extends Http::Client::Request::Range {
BlobRequestCall() {
this =
[
// Class methods
API::getTopLevelMember("ActiveStorage")
.getMember("Blob")
.getASubclass()
.getAMethodCall(["create_after_unfurling!", "create_and_upload!"]),
// Instance methods
any(BlobInstance i, DataFlow::CallNode c |
i.(DataFlow::LocalSourceNode).flowsTo(c.getReceiver()) and
c.getMethodName() =
[
"upload", "upload_without_unfurling", "download", "download_chunk", "delete",
"purge"
]
|
c
)
]
}
override string getFramework() { result = "activestorage" }
override DataFlow::Node getResponseBody() { result = this }
override DataFlow::Node getAUrlPart() { none() }
override predicate disablesCertificateValidation(
DataFlow::Node disablingNode, DataFlow::Node argumentOrigin
) {
none()
}
}
/**
* A call to `has_one_attached` or `has_many_attached`, which declares an
* association between an ActiveRecord model and an ActiveStorage attachment.
*
* ```rb
* class User < ActiveRecord::Base
* has_one_attached :avatar
* end
* ```
*/
private class Association extends ActiveRecordAssociation {
Association() { this.getMethodName() = ["has_one_attached", "has_many_attached"] }
}
/**
* An ActiveStorage attachment, instantiated directly or via an association with an
* ActiveRecord model.
*
* ```rb
* class User < ActiveRecord::Base
* has_one_attached :avatar
* end
*
* user = User.find(id)
* user.avatar
* ActiveStorage::Attachment.new
* ```
*/
class AttachmentInstance extends DataFlow::Node {
AttachmentInstance() {
this =
API::getTopLevelMember("ActiveStorage")
.getMember("Attachment")
.getInstance()
.getAValueReachableFromSource()
or
exists(Association assoc, string model, DataFlow::CallNode call |
model = assoc.getTargetModelName()
|
call = this and
call.getReceiver().(ActiveRecordInstance).getClass() = assoc.getSourceClass() and
call.getMethodName() = model
)
or
any(AttachmentInstance i).(DataFlow::LocalSourceNode).flowsTo(this)
}
}
/**
* A call on an ActiveStorage object that results in an image transformation.
* Arguments to these calls may be executed as system commands.
*/
private class ImageProcessingCall extends DataFlow::CallNode, SystemCommandExecution::Range {
ImageProcessingCall() {
this.getReceiver() instanceof BlobInstance and
this.getMethodName() = ["variant", "preview", "representation"]
or
this =
API::getTopLevelMember("ActiveStorage")
.getMember("Attachment")
.getInstance()
.getAMethodCall(["variant", "preview", "representation"])
or
this =
API::getTopLevelMember("ActiveStorage")
.getMember("Variation")
.getAMethodCall(["new", "wrap", "encode"])
or
this =
API::getTopLevelMember("ActiveStorage")
.getMember("Variation")
.getInstance()
.getAMethodCall("transformations=")
or
this =
API::getTopLevelMember("ActiveStorage")
.getMember("Transformers")
.getMember("ImageProcessingTransformer")
.getAMethodCall("new")
or
this =
API::getTopLevelMember("ActiveStorage")
.getMember(["Preview", "VariantWithRecord"])
.getAMethodCall("new")
or
// `ActiveStorage.paths` is a global hash whose values are passed to
// a `system` call.
this = API::getTopLevelMember("ActiveStorage").getAMethodCall("paths=")
or
// `ActiveStorage.video_preview_arguments` is passed to a `system` call.
this = API::getTopLevelMember("ActiveStorage").getAMethodCall("video_preview_arguments=")
}
override DataFlow::Node getAnArgument() { result = this.getArgument(0) }
}
/**
* `ActiveStorage.variant_processor` is passed to `const_get`.
*/
private class VariantProcessor extends DataFlow::CallNode, CodeExecution::Range {
VariantProcessor() {
this = API::getTopLevelMember("ActiveStorage").getAMethodCall("variant_processor=")
}
override DataFlow::Node getCode() { result = this.getArgument(0) }
}
}

View File

@@ -164,14 +164,27 @@ module ModelInput {
class TypeModel extends Unit {
/**
* Gets a data-flow node that is a source of the type `package;type`.
*
* This must not depend on API graphs, but ensures that an API node is generated for
* the source.
*/
DataFlow::Node getASource(string package, string type) { none() }
/**
* Gets a data flow node that is a sink of the type `package;type`,
* Gets a data-flow node that is a sink of the type `package;type`,
* usually because it is an argument passed to a parameter of that type.
*
* This must not depend on API graphs, but ensures that an API node is generated for
* the sink.
*/
DataFlow::Node getASink(string package, string type) { none() }
/**
* Gets an API node that is a source or sink of the type `package;type`.
*
* Unlike `getASource` and `getASink`, this may depend on API graphs.
*/
API::Node getAnApiNode(string package, string type) { none() }
}
/**
@@ -434,6 +447,8 @@ private API::Node getNodeFromType(string package, string type) {
or
result = any(TypeModelDefEntry e).getNodeForType(package, type)
or
result = any(TypeModel t).getAnApiNode(package, type)
or
result = Specific::getExtraNodeFromType(package, type)
}

View File

@@ -34,12 +34,16 @@ edges
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:128:26:128:32 | tainted |
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:130:23:130:29 | tainted |
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:130:23:130:29 | tainted |
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:133:26:133:32 | tainted |
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:133:26:133:32 | tainted |
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:135:16:135:22 | tainted |
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:135:16:135:22 | tainted |
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:138:39:138:45 | tainted |
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:138:39:138:45 | tainted |
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:133:19:133:25 | tainted |
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:133:19:133:25 | tainted |
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:134:19:134:25 | tainted |
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:134:19:134:25 | tainted |
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:138:26:138:32 | tainted |
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:138:26:138:32 | tainted |
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:140:16:140:22 | tainted |
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:140:16:140:22 | tainted |
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:143:39:143:45 | tainted |
| summaries.rb:1:11:1:36 | call to identity : | summaries.rb:143:39:143:45 | tainted |
| summaries.rb:1:20:1:36 | call to source : | summaries.rb:1:11:1:36 | call to identity : |
| summaries.rb:1:20:1:36 | call to source : | summaries.rb:1:11:1:36 | call to identity : |
| summaries.rb:4:12:7:3 | call to apply_block : | summaries.rb:9:6:9:13 | tainted2 |
@@ -192,9 +196,11 @@ edges
| summaries.rb:115:16:115:22 | [post] tainted : | summaries.rb:125:21:125:27 | tainted |
| summaries.rb:115:16:115:22 | [post] tainted : | summaries.rb:128:26:128:32 | tainted |
| summaries.rb:115:16:115:22 | [post] tainted : | summaries.rb:130:23:130:29 | tainted |
| summaries.rb:115:16:115:22 | [post] tainted : | summaries.rb:133:26:133:32 | tainted |
| summaries.rb:115:16:115:22 | [post] tainted : | summaries.rb:135:16:135:22 | tainted |
| summaries.rb:115:16:115:22 | [post] tainted : | summaries.rb:138:39:138:45 | tainted |
| summaries.rb:115:16:115:22 | [post] tainted : | summaries.rb:133:19:133:25 | tainted |
| summaries.rb:115:16:115:22 | [post] tainted : | summaries.rb:134:19:134:25 | tainted |
| summaries.rb:115:16:115:22 | [post] tainted : | summaries.rb:138:26:138:32 | tainted |
| summaries.rb:115:16:115:22 | [post] tainted : | summaries.rb:140:16:140:22 | tainted |
| summaries.rb:115:16:115:22 | [post] tainted : | summaries.rb:143:39:143:45 | tainted |
| summaries.rb:115:16:115:22 | tainted : | summaries.rb:115:16:115:22 | [post] tainted : |
| summaries.rb:115:16:115:22 | tainted : | summaries.rb:115:25:115:25 | [post] y : |
| summaries.rb:115:16:115:22 | tainted : | summaries.rb:115:33:115:33 | [post] z : |
@@ -396,12 +402,16 @@ nodes
| summaries.rb:128:26:128:32 | tainted | semmle.label | tainted |
| summaries.rb:130:23:130:29 | tainted | semmle.label | tainted |
| summaries.rb:130:23:130:29 | tainted | semmle.label | tainted |
| summaries.rb:133:26:133:32 | tainted | semmle.label | tainted |
| summaries.rb:133:26:133:32 | tainted | semmle.label | tainted |
| summaries.rb:135:16:135:22 | tainted | semmle.label | tainted |
| summaries.rb:135:16:135:22 | tainted | semmle.label | tainted |
| summaries.rb:138:39:138:45 | tainted | semmle.label | tainted |
| summaries.rb:138:39:138:45 | tainted | semmle.label | tainted |
| summaries.rb:133:19:133:25 | tainted | semmle.label | tainted |
| summaries.rb:133:19:133:25 | tainted | semmle.label | tainted |
| summaries.rb:134:19:134:25 | tainted | semmle.label | tainted |
| summaries.rb:134:19:134:25 | tainted | semmle.label | tainted |
| summaries.rb:138:26:138:32 | tainted | semmle.label | tainted |
| summaries.rb:138:26:138:32 | tainted | semmle.label | tainted |
| summaries.rb:140:16:140:22 | tainted | semmle.label | tainted |
| summaries.rb:140:16:140:22 | tainted | semmle.label | tainted |
| summaries.rb:143:39:143:45 | tainted | semmle.label | tainted |
| summaries.rb:143:39:143:45 | tainted | semmle.label | tainted |
subpaths
invalidSpecComponent
#select
@@ -489,12 +499,16 @@ invalidSpecComponent
| summaries.rb:128:26:128:32 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:128:26:128:32 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
| summaries.rb:130:23:130:29 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:130:23:130:29 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
| summaries.rb:130:23:130:29 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:130:23:130:29 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
| summaries.rb:133:26:133:32 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:133:26:133:32 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
| summaries.rb:133:26:133:32 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:133:26:133:32 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
| summaries.rb:135:16:135:22 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:135:16:135:22 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
| summaries.rb:135:16:135:22 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:135:16:135:22 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
| summaries.rb:138:39:138:45 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:138:39:138:45 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
| summaries.rb:138:39:138:45 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:138:39:138:45 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
| summaries.rb:133:19:133:25 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:133:19:133:25 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
| summaries.rb:133:19:133:25 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:133:19:133:25 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
| summaries.rb:134:19:134:25 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:134:19:134:25 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
| summaries.rb:134:19:134:25 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:134:19:134:25 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
| summaries.rb:138:26:138:32 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:138:26:138:32 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
| summaries.rb:138:26:138:32 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:138:26:138:32 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
| summaries.rb:140:16:140:22 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:140:16:140:22 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
| summaries.rb:140:16:140:22 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:140:16:140:22 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
| summaries.rb:143:39:143:45 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:143:39:143:45 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
| summaries.rb:143:39:143:45 | tainted | summaries.rb:1:20:1:36 | call to source : | summaries.rb:143:39:143:45 | tainted | $@ | summaries.rb:1:20:1:36 | call to source : | call to source : |
warning
| CSV type row should have 5 columns but has 2: test;TooFewColumns |
| CSV type row should have 5 columns but has 8: test;TooManyColumns;;;Member[Foo].Instance;too;many;columns |

View File

@@ -3,6 +3,7 @@
*/
import codeql.ruby.AST
import codeql.ruby.ApiGraphs
import codeql.ruby.dataflow.FlowSummary
import codeql.ruby.TaintTracking
import codeql.ruby.dataflow.internal.FlowSummaryImpl
@@ -112,6 +113,12 @@ private class TypeFromCodeQL extends ModelInput::TypeModel {
type = "FooOrBar" and
result.asExpr().getExpr().getConstantValue().getString() = "magic_string"
}
override API::Node getAnApiNode(string package, string type) {
package = "test" and
type = "FooOrBar" and
result = API::getTopLevelMember("Alias").getMember(["Foo", "Bar"])
}
}
private class InvalidTypeModel extends ModelInput::TypeModelCsv {

View File

@@ -130,6 +130,11 @@ Foo.sinkAnyNamedArg(key: tainted) # $ hasValueFlow=tainted
"magic_string".method(tainted) # $ hasValueFlow=tainted
"magic_string2".method(tainted)
Alias::Foo.method(tainted) # $ hasValueFlow=tainted
Alias::Bar.method(tainted) # $ hasValueFlow=tainted
Something::Foo.method(tainted)
Alias::Something.method(tainted)
Foo.getSinks()[0].mySink(tainted) # $ hasValueFlow=tainted
Foo.arraySink(tainted)
Foo.arraySink([tainted]) # $ hasValueFlow=tainted

View File

@@ -26,12 +26,14 @@ rbiTypes
| test_types.rb:38:48:38:53 | String |
| test_types.rb:43:22:43:22 | T |
| test_types.rb:43:22:43:28 | Hash |
| test_types.rb:43:22:43:50 | ...[...] |
| test_types.rb:43:30:43:30 | T |
| test_types.rb:43:30:43:38 | call to untyped |
| test_types.rb:43:41:43:41 | T |
| test_types.rb:43:41:43:49 | call to untyped |
| test_types.rb:46:21:46:21 | T |
| test_types.rb:46:21:46:28 | Array |
| test_types.rb:46:21:46:36 | ...[...] |
| test_types.rb:46:30:46:35 | Symbol |
| test_types.rb:49:26:49:26 | T |
| test_types.rb:49:26:49:46 | call to any |
@@ -100,6 +102,8 @@ parameterTypes
| test_types.rb:30:7:30:54 | Pair | test_types.rb:33:29:33:34 | &block | test_types.rb:30:14:30:54 | call to nilable |
| test_types.rb:37:7:37:15 | Pair | test_types.rb:41:18:41:18 | a | test_types.rb:37:10:37:15 | String |
| test_types.rb:38:7:38:54 | Pair | test_types.rb:41:21:41:26 | &block | test_types.rb:38:14:38:54 | call to returns |
| test_types.rb:43:16:43:50 | Pair | test_types.rb:44:17:44:22 | **hash | test_types.rb:43:22:43:50 | ...[...] |
| test_types.rb:46:16:46:36 | Pair | test_types.rb:47:25:47:28 | *arr | test_types.rb:46:21:46:36 | ...[...] |
| test_types.rb:49:16:49:46 | Pair | test_types.rb:50:14:50:21 | new_name | test_types.rb:49:26:49:46 | call to any |
| test_types.rb:52:16:52:32 | Pair | test_types.rb:53:24:53:28 | value | test_types.rb:52:23:52:32 | Boolean |
procParameterTypes

View File

@@ -1,8 +1,9 @@
actionControllerControllerClasses
| active_record/ActiveRecord.rb:23:1:39:3 | FooController |
| active_record/ActiveRecord.rb:41:1:64:3 | BarController |
| active_record/ActiveRecord.rb:66:1:94:3 | BazController |
| active_record/ActiveRecord.rb:96:1:104:3 | AnnotatedController |
| active_record/ActiveRecord.rb:66:1:98:3 | BazController |
| active_record/ActiveRecord.rb:100:1:108:3 | AnnotatedController |
| active_storage/active_storage.rb:39:1:45:3 | PostsController |
| app/controllers/comments_controller.rb:1:1:7:3 | CommentsController |
| app/controllers/foo/bars_controller.rb:3:1:46:3 | BarsController |
| app/controllers/photos_controller.rb:1:1:4:3 | PhotosController |
@@ -16,11 +17,13 @@ actionControllerActionMethods
| active_record/ActiveRecord.rb:71:3:73:5 | create1 |
| active_record/ActiveRecord.rb:75:3:77:5 | create2 |
| active_record/ActiveRecord.rb:79:3:81:5 | create3 |
| active_record/ActiveRecord.rb:83:3:85:5 | update1 |
| active_record/ActiveRecord.rb:87:3:89:5 | update2 |
| active_record/ActiveRecord.rb:91:3:93:5 | update3 |
| active_record/ActiveRecord.rb:97:3:99:5 | index |
| active_record/ActiveRecord.rb:101:3:103:5 | unsafe_action |
| active_record/ActiveRecord.rb:83:3:85:5 | create4 |
| active_record/ActiveRecord.rb:87:3:89:5 | update1 |
| active_record/ActiveRecord.rb:91:3:93:5 | update2 |
| active_record/ActiveRecord.rb:95:3:97:5 | update3 |
| active_record/ActiveRecord.rb:101:3:103:5 | index |
| active_record/ActiveRecord.rb:105:3:107:5 | unsafe_action |
| active_storage/active_storage.rb:40:3:44:5 | create |
| app/controllers/comments_controller.rb:2:3:3:5 | index |
| app/controllers/comments_controller.rb:5:3:6:5 | show |
| app/controllers/foo/bars_controller.rb:5:3:7:5 | index |
@@ -53,12 +56,14 @@ paramsCalls
| active_record/ActiveRecord.rb:76:49:76:54 | call to params |
| active_record/ActiveRecord.rb:80:25:80:30 | call to params |
| active_record/ActiveRecord.rb:80:50:80:55 | call to params |
| active_record/ActiveRecord.rb:84:21:84:26 | call to params |
| active_record/ActiveRecord.rb:88:27:88:32 | call to params |
| active_record/ActiveRecord.rb:88:52:88:57 | call to params |
| active_record/ActiveRecord.rb:92:28:92:33 | call to params |
| active_record/ActiveRecord.rb:92:53:92:58 | call to params |
| active_record/ActiveRecord.rb:102:59:102:64 | call to params |
| active_record/ActiveRecord.rb:88:21:88:26 | call to params |
| active_record/ActiveRecord.rb:92:27:92:32 | call to params |
| active_record/ActiveRecord.rb:92:52:92:57 | call to params |
| active_record/ActiveRecord.rb:96:28:96:33 | call to params |
| active_record/ActiveRecord.rb:96:53:96:58 | call to params |
| active_record/ActiveRecord.rb:106:59:106:64 | call to params |
| active_storage/active_storage.rb:41:21:41:26 | call to params |
| active_storage/active_storage.rb:42:24:42:29 | call to params |
| app/controllers/foo/bars_controller.rb:13:21:13:26 | call to params |
| app/controllers/foo/bars_controller.rb:14:10:14:15 | call to params |
| app/controllers/foo/bars_controller.rb:21:21:21:26 | call to params |
@@ -83,12 +88,14 @@ paramsSources
| active_record/ActiveRecord.rb:76:49:76:54 | call to params |
| active_record/ActiveRecord.rb:80:25:80:30 | call to params |
| active_record/ActiveRecord.rb:80:50:80:55 | call to params |
| active_record/ActiveRecord.rb:84:21:84:26 | call to params |
| active_record/ActiveRecord.rb:88:27:88:32 | call to params |
| active_record/ActiveRecord.rb:88:52:88:57 | call to params |
| active_record/ActiveRecord.rb:92:28:92:33 | call to params |
| active_record/ActiveRecord.rb:92:53:92:58 | call to params |
| active_record/ActiveRecord.rb:102:59:102:64 | call to params |
| active_record/ActiveRecord.rb:88:21:88:26 | call to params |
| active_record/ActiveRecord.rb:92:27:92:32 | call to params |
| active_record/ActiveRecord.rb:92:52:92:57 | call to params |
| active_record/ActiveRecord.rb:96:28:96:33 | call to params |
| active_record/ActiveRecord.rb:96:53:96:58 | call to params |
| active_record/ActiveRecord.rb:106:59:106:64 | call to params |
| active_storage/active_storage.rb:41:21:41:26 | call to params |
| active_storage/active_storage.rb:42:24:42:29 | call to params |
| app/controllers/foo/bars_controller.rb:13:21:13:26 | call to params |
| app/controllers/foo/bars_controller.rb:14:10:14:15 | call to params |
| app/controllers/foo/bars_controller.rb:21:21:21:26 | call to params |

View File

@@ -16,6 +16,10 @@ activeRecordInstances
| ActiveRecord.rb:56:7:56:40 | call to find_by |
| ActiveRecord.rb:60:5:60:33 | call to find_by |
| ActiveRecord.rb:62:5:62:34 | call to find |
| ActiveRecord.rb:72:5:72:24 | call to create |
| ActiveRecord.rb:76:5:76:66 | call to create |
| ActiveRecord.rb:80:5:80:68 | call to create |
| ActiveRecord.rb:84:5:84:16 | call to create |
| associations.rb:19:1:19:20 | ... = ... |
| associations.rb:19:1:19:20 | ... = ... |
| associations.rb:19:11:19:20 | call to new |
@@ -109,7 +113,7 @@ activeRecordSqlExecutionRanges
| ActiveRecord.rb:46:20:46:32 | ... + ... |
| ActiveRecord.rb:52:16:52:28 | "name #{...}" |
| ActiveRecord.rb:56:20:56:39 | "username = #{...}" |
| ActiveRecord.rb:102:27:102:76 | "this is an unsafe annotation:..." |
| ActiveRecord.rb:106:27:106:76 | "this is an unsafe annotation:..." |
activeRecordModelClassMethodCalls
| ActiveRecord.rb:2:3:2:17 | call to has_many |
| ActiveRecord.rb:6:3:6:24 | call to belongs_to |
@@ -135,11 +139,12 @@ activeRecordModelClassMethodCalls
| ActiveRecord.rb:72:5:72:24 | call to create |
| ActiveRecord.rb:76:5:76:66 | call to create |
| ActiveRecord.rb:80:5:80:68 | call to create |
| ActiveRecord.rb:84:5:84:27 | call to update |
| ActiveRecord.rb:88:5:88:69 | call to update |
| ActiveRecord.rb:92:5:92:71 | call to update |
| ActiveRecord.rb:98:13:98:54 | call to annotate |
| ActiveRecord.rb:102:13:102:77 | call to annotate |
| ActiveRecord.rb:84:5:84:16 | call to create |
| ActiveRecord.rb:88:5:88:27 | call to update |
| ActiveRecord.rb:92:5:92:69 | call to update |
| ActiveRecord.rb:96:5:96:71 | call to update |
| ActiveRecord.rb:102:13:102:54 | call to annotate |
| ActiveRecord.rb:106:13:106:77 | call to annotate |
| associations.rb:2:3:2:17 | call to has_many |
| associations.rb:6:3:6:20 | call to belongs_to |
| associations.rb:7:3:7:20 | call to has_many |
@@ -158,7 +163,7 @@ potentiallyUnsafeSqlExecutingMethodCall
| ActiveRecord.rb:46:5:46:33 | call to delete_by |
| ActiveRecord.rb:52:5:52:29 | call to order |
| ActiveRecord.rb:56:7:56:40 | call to find_by |
| ActiveRecord.rb:102:13:102:77 | call to annotate |
| ActiveRecord.rb:106:13:106:77 | call to annotate |
activeRecordModelInstantiations
| ActiveRecord.rb:9:5:9:68 | call to find | ActiveRecord.rb:5:1:15:3 | User |
| ActiveRecord.rb:13:5:13:40 | call to find_by | ActiveRecord.rb:1:1:3:3 | UserGroup |
@@ -167,6 +172,10 @@ activeRecordModelInstantiations
| ActiveRecord.rb:56:7:56:40 | call to find_by | ActiveRecord.rb:5:1:15:3 | User |
| ActiveRecord.rb:60:5:60:33 | call to find_by | ActiveRecord.rb:5:1:15:3 | User |
| ActiveRecord.rb:62:5:62:34 | call to find | ActiveRecord.rb:5:1:15:3 | User |
| ActiveRecord.rb:72:5:72:24 | call to create | ActiveRecord.rb:17:1:21:3 | Admin |
| ActiveRecord.rb:76:5:76:66 | call to create | ActiveRecord.rb:17:1:21:3 | Admin |
| ActiveRecord.rb:80:5:80:68 | call to create | ActiveRecord.rb:17:1:21:3 | Admin |
| ActiveRecord.rb:84:5:84:16 | call to create | ActiveRecord.rb:17:1:21:3 | Admin |
| associations.rb:19:11:19:20 | call to new | associations.rb:1:1:3:3 | Author |
| associations.rb:21:9:21:21 | call to posts | associations.rb:5:1:9:3 | Post |
| associations.rb:21:9:21:28 | call to create | associations.rb:5:1:9:3 | Post |
@@ -213,8 +222,8 @@ persistentWriteAccesses
| ActiveRecord.rb:76:5:76:66 | call to create | ActiveRecord.rb:76:49:76:65 | ...[...] |
| ActiveRecord.rb:80:5:80:68 | call to create | ActiveRecord.rb:80:25:80:37 | ...[...] |
| ActiveRecord.rb:80:5:80:68 | call to create | ActiveRecord.rb:80:50:80:66 | ...[...] |
| ActiveRecord.rb:84:5:84:27 | call to update | ActiveRecord.rb:84:21:84:26 | call to params |
| ActiveRecord.rb:88:5:88:69 | call to update | ActiveRecord.rb:88:27:88:39 | ...[...] |
| ActiveRecord.rb:88:5:88:69 | call to update | ActiveRecord.rb:88:52:88:68 | ...[...] |
| ActiveRecord.rb:92:5:92:71 | call to update | ActiveRecord.rb:92:21:92:70 | call to [] |
| ActiveRecord.rb:88:5:88:27 | call to update | ActiveRecord.rb:88:21:88:26 | call to params |
| ActiveRecord.rb:92:5:92:69 | call to update | ActiveRecord.rb:92:27:92:39 | ...[...] |
| ActiveRecord.rb:92:5:92:69 | call to update | ActiveRecord.rb:92:52:92:68 | ...[...] |
| ActiveRecord.rb:96:5:96:71 | call to update | ActiveRecord.rb:96:21:96:70 | call to [] |
| associations.rb:31:16:31:22 | ... = ... | associations.rb:31:16:31:22 | author2 |

View File

@@ -80,6 +80,10 @@ class BazController < BarController
Admin.create({name: params[:name], password: params[:password]})
end
def create4
Admin.create
end
def update1
Admin.update(1, params)
end

View File

@@ -0,0 +1,47 @@
attachmentInstances
| active_storage.rb:11:1:11:25 | ... = ... |
| active_storage.rb:11:1:11:25 | ... = ... |
| active_storage.rb:11:15:11:25 | call to avatar |
| active_storage.rb:13:1:13:11 | user_avatar |
| active_storage.rb:14:1:14:11 | user_avatar |
| active_storage.rb:15:1:15:11 | user_avatar |
| active_storage.rb:17:1:17:11 | call to avatar |
| active_storage.rb:19:1:19:42 | ... = ... |
| active_storage.rb:19:1:19:42 | ... = ... |
| active_storage.rb:19:14:19:42 | call to new |
| active_storage.rb:23:11:23:20 | attachment |
| active_storage.rb:24:11:24:20 | attachment |
| active_storage.rb:25:18:25:27 | attachment |
| active_storage.rb:42:5:42:15 | call to images |
| active_storage.rb:73:1:73:10 | attachment |
| active_storage.rb:74:1:74:10 | attachment |
httpRequests
| active_storage.rb:50:1:50:74 | call to create_after_unfurling! | activestorage | active_storage.rb:50:1:50:74 | call to create_after_unfurling! |
| active_storage.rb:51:8:51:76 | call to create_and_upload! | activestorage | active_storage.rb:51:8:51:76 | call to create_and_upload! |
| active_storage.rb:53:1:53:11 | call to upload | activestorage | active_storage.rb:53:1:53:11 | call to upload |
| active_storage.rb:54:1:54:29 | call to upload_without_unfurling | activestorage | active_storage.rb:54:1:54:29 | call to upload_without_unfurling |
| active_storage.rb:55:1:55:13 | call to download | activestorage | active_storage.rb:55:1:55:13 | call to download |
| active_storage.rb:56:1:56:19 | call to download_chunk | activestorage | active_storage.rb:56:1:56:19 | call to download_chunk |
| active_storage.rb:57:1:57:11 | call to delete | activestorage | active_storage.rb:57:1:57:11 | call to delete |
| active_storage.rb:58:1:58:10 | call to purge | activestorage | active_storage.rb:58:1:58:10 | call to purge |
| active_storage.rb:61:1:61:11 | call to upload | activestorage | active_storage.rb:61:1:61:11 | call to upload |
| active_storage.rb:65:1:65:11 | call to upload | activestorage | active_storage.rb:65:1:65:11 | call to upload |
| active_storage.rb:68:1:68:11 | call to upload | activestorage | active_storage.rb:68:1:68:11 | call to upload |
| active_storage.rb:71:1:71:11 | call to upload | activestorage | active_storage.rb:71:1:71:11 | call to upload |
| active_storage.rb:73:1:73:22 | call to upload | activestorage | active_storage.rb:73:1:73:22 | call to upload |
| active_storage.rb:74:1:74:17 | call to upload | activestorage | active_storage.rb:74:1:74:17 | call to upload |
commandExecutions
| active_storage.rb:17:1:17:48 | call to variant | active_storage.rb:17:21:17:47 | Pair |
| active_storage.rb:23:11:23:57 | call to variant | active_storage.rb:23:30:23:56 | Pair |
| active_storage.rb:24:11:24:44 | call to preview | active_storage.rb:24:30:24:43 | Pair |
| active_storage.rb:25:18:25:59 | call to representation | active_storage.rb:25:44:25:58 | Pair |
| active_storage.rb:28:1:28:25 | call to transformations= | active_storage.rb:28:29:28:43 | ... = ... |
| active_storage.rb:30:15:30:90 | call to new | active_storage.rb:30:75:30:89 | transformations |
| active_storage.rb:31:11:31:53 | call to new | active_storage.rb:31:38:31:52 | transformations |
| active_storage.rb:32:11:32:63 | call to new | active_storage.rb:32:48:32:62 | transformations |
| active_storage.rb:34:1:34:19 | call to paths= | active_storage.rb:34:23:34:60 | ... = ... |
| active_storage.rb:35:1:35:37 | call to video_preview_arguments= | active_storage.rb:35:41:35:59 | ... = ... |
codeExecutions
| active_storage.rb:37:1:37:31 | call to variant_processor= | active_storage.rb:37:35:37:50 | ... = ... |
pathSanitizations
| active_storage.rb:48:1:48:18 | call to sanitized |

View File

@@ -0,0 +1,18 @@
import ruby
import codeql.ruby.ApiGraphs
import codeql.ruby.Concepts
import codeql.ruby.frameworks.ActiveStorage
query predicate attachmentInstances(ActiveStorage::AttachmentInstance n) { any() }
query predicate httpRequests(Http::Client::Request r, string framework, DataFlow::Node responseBody) {
r.getFramework() = framework and r.getResponseBody() = responseBody
}
query predicate commandExecutions(SystemCommandExecution c, DataFlow::Node arg) {
arg = c.getAnArgument()
}
query predicate codeExecutions(CodeExecution e, DataFlow::Node code) { code = e.getCode() }
query predicate pathSanitizations(Path::PathSanitization p) { any() }

View File

@@ -0,0 +1,74 @@
class User < ActiveRecord::Base
has_one_attached :avatar
end
class Post < ActiveRecord::Base
has_many_attached :images
end
user = User.find(id)
user_avatar = user.avatar
user_avatar.preview
user_avatar.representation
user_avatar.variant
user.avatar.variant(resize_to_limit: [128, 128])
attachment = ActiveStorage::Attachment.new
transformations = [{ resize_to_limit: [128, 128] }, { gaussblur: 3 }]
variant = attachment.variant(resize_to_limit: [128, 128])
preview = attachment.preview(gaussblur: 0.3)
representation = attachment.representation(crop: "300x300")
variation = ActiveStorage::Variation.new
variation.transformations = transformations
transformer = ActiveStorage::Transformers::ImageProcessingTransformer.new(transformations)
preview = ActiveStorage::Preview.new(transformations)
variant = ActiveStorage::VariantWithRecord.new(transformations)
ActiveStorage.paths = { minimagick: custom_minimagick_path }
ActiveStorage.video_preview_arguments = custom_preview_args
ActiveStorage.variant_processor = custom_processor
class PostsController < ActionController::Base
def create
post = Post.new(params[:post])
post.images.attach(params[:images])
post.save
end
end
filename = ActiveStorage::Filename.new(raw_path)
filename.sanitized
ActiveStorage::Blob.create_after_unfurling!(io: file, filename: "foo.jpg")
blob = ActiveStorage::Blob.create_and_upload!(io: file, filename: "foo.jpg")
blob.upload
blob.upload_without_unfurling
blob.download
blob.download_chunk
blob.delete
blob.purge
blob = ActiveStorage::Blob.create_before_direct_upload!(io: file, filename: "foo.jpg")
blob.upload
blob = ActiveStorage::Blob.compose([blob1, blob2])
blob1.upload # not recognised currently
blob.upload
blob = ActiveStorage::Blob.find_signed(id)
blob.upload
blob = ActiveStorage::Blob.find_signed!(id)
blob.upload
attachment.blob.upload
attachment.upload

View File

@@ -191,10 +191,10 @@ private.rb:
# 1| E
#-----| super -> Object
# 42| F
# 62| F
# 62| PrivateOverride1
# 82| PrivateOverride1
#-----| super -> Object
# 76| PrivateOverride2
# 96| PrivateOverride2
#-----| super -> PrivateOverride1

View File

@@ -196,29 +196,31 @@ getTarget
| private.rb:2:3:3:5 | call to private | calls.rb:109:5:109:20 | private |
| private.rb:10:3:10:19 | call to private | calls.rb:109:5:109:20 | private |
| private.rb:12:3:12:9 | call to private | calls.rb:109:5:109:20 | private |
| private.rb:34:1:34:5 | call to new | calls.rb:114:5:114:16 | new |
| private.rb:35:1:35:5 | call to new | calls.rb:114:5:114:16 | new |
| private.rb:36:1:36:5 | call to new | calls.rb:114:5:114:16 | new |
| private.rb:37:1:37:5 | call to new | calls.rb:114:5:114:16 | new |
| private.rb:38:1:38:5 | call to new | calls.rb:114:5:114:16 | new |
| private.rb:38:1:38:12 | call to public | private.rb:5:3:6:5 | public |
| private.rb:40:1:40:15 | call to private_on_main | private.rb:31:1:32:3 | private_on_main |
| private.rb:43:3:44:5 | call to private | calls.rb:109:5:109:20 | private |
| private.rb:51:3:51:19 | call to private | calls.rb:109:5:109:20 | private |
| private.rb:53:3:53:9 | call to private | calls.rb:109:5:109:20 | private |
| private.rb:63:3:65:5 | call to private | calls.rb:109:5:109:20 | private |
| private.rb:64:7:64:32 | call to puts | calls.rb:102:5:102:30 | puts |
| private.rb:67:3:69:5 | call to private | calls.rb:109:5:109:20 | private |
| private.rb:68:7:68:32 | call to puts | calls.rb:102:5:102:30 | puts |
| private.rb:72:7:72:8 | call to m1 | private.rb:63:11:65:5 | m1 |
| private.rb:72:7:72:8 | call to m1 | private.rb:77:11:81:5 | m1 |
| private.rb:77:3:81:5 | call to private | calls.rb:109:5:109:20 | private |
| private.rb:78:7:78:32 | call to puts | calls.rb:102:5:102:30 | puts |
| private.rb:79:7:79:8 | call to m2 | private.rb:67:11:69:5 | m2 |
| private.rb:80:7:80:26 | call to new | calls.rb:114:5:114:16 | new |
| private.rb:84:1:84:20 | call to new | calls.rb:114:5:114:16 | new |
| private.rb:84:1:84:28 | call to call_m1 | private.rb:71:3:73:5 | call_m1 |
| private.rb:85:1:85:20 | call to new | calls.rb:114:5:114:16 | new |
| private.rb:43:3:43:19 | call to private | calls.rb:109:5:109:20 | private |
| private.rb:45:3:45:9 | call to private | calls.rb:109:5:109:20 | private |
| private.rb:54:1:54:5 | call to new | calls.rb:114:5:114:16 | new |
| private.rb:55:1:55:5 | call to new | calls.rb:114:5:114:16 | new |
| private.rb:56:1:56:5 | call to new | calls.rb:114:5:114:16 | new |
| private.rb:57:1:57:5 | call to new | calls.rb:114:5:114:16 | new |
| private.rb:58:1:58:5 | call to new | calls.rb:114:5:114:16 | new |
| private.rb:58:1:58:12 | call to public | private.rb:5:3:6:5 | public |
| private.rb:60:1:60:15 | call to private_on_main | private.rb:51:1:52:3 | private_on_main |
| private.rb:63:3:64:5 | call to private | calls.rb:109:5:109:20 | private |
| private.rb:71:3:71:19 | call to private | calls.rb:109:5:109:20 | private |
| private.rb:73:3:73:9 | call to private | calls.rb:109:5:109:20 | private |
| private.rb:83:3:85:5 | call to private | calls.rb:109:5:109:20 | private |
| private.rb:84:7:84:32 | call to puts | calls.rb:102:5:102:30 | puts |
| private.rb:87:3:89:5 | call to private | calls.rb:109:5:109:20 | private |
| private.rb:88:7:88:32 | call to puts | calls.rb:102:5:102:30 | puts |
| private.rb:92:7:92:8 | call to m1 | private.rb:83:11:85:5 | m1 |
| private.rb:92:7:92:8 | call to m1 | private.rb:97:11:101:5 | m1 |
| private.rb:97:3:101:5 | call to private | calls.rb:109:5:109:20 | private |
| private.rb:98:7:98:32 | call to puts | calls.rb:102:5:102:30 | puts |
| private.rb:99:7:99:8 | call to m2 | private.rb:87:11:89:5 | m2 |
| private.rb:100:7:100:26 | call to new | calls.rb:114:5:114:16 | new |
| private.rb:104:1:104:20 | call to new | calls.rb:114:5:114:16 | new |
| private.rb:104:1:104:28 | call to call_m1 | private.rb:91:3:93:5 | call_m1 |
| private.rb:105:1:105:20 | call to new | calls.rb:114:5:114:16 | new |
unresolvedCall
| calls.rb:26:9:26:18 | call to instance_m |
| calls.rb:29:5:29:14 | call to instance_m |
@@ -290,12 +292,13 @@ unresolvedCall
| modules_rec.rb:11:1:11:9 | call to prepend |
| private.rb:23:3:24:5 | call to private_class_method |
| private.rb:28:3:28:32 | call to private_class_method |
| private.rb:34:1:34:14 | call to private1 |
| private.rb:35:1:35:14 | call to private2 |
| private.rb:36:1:36:14 | call to private3 |
| private.rb:37:1:37:14 | call to private4 |
| private.rb:80:7:80:29 | call to m1 |
| private.rb:85:1:85:23 | call to m1 |
| private.rb:30:3:30:11 | call to protected |
| private.rb:54:1:54:14 | call to private1 |
| private.rb:55:1:55:14 | call to private2 |
| private.rb:56:1:56:14 | call to private3 |
| private.rb:57:1:57:14 | call to private4 |
| private.rb:100:7:100:29 | call to m1 |
| private.rb:105:1:105:23 | call to m1 |
privateMethod
| calls.rb:1:1:3:3 | foo |
| calls.rb:39:1:41:3 | call_instance_m |
@@ -316,11 +319,87 @@ privateMethod
| private.rb:17:3:18:5 | private4 |
| private.rb:23:24:24:5 | private5 |
| private.rb:26:3:27:5 | private6 |
| private.rb:31:1:32:3 | private_on_main |
| private.rb:43:11:44:5 | private1 |
| private.rb:49:3:50:5 | private2 |
| private.rb:55:3:56:5 | private3 |
| private.rb:58:3:59:5 | private4 |
| private.rb:63:11:65:5 | m1 |
| private.rb:67:11:69:5 | m2 |
| private.rb:77:11:81:5 | m1 |
| private.rb:41:3:42:5 | private7 |
| private.rb:47:3:48:5 | private8 |
| private.rb:51:1:52:3 | private_on_main |
| private.rb:63:11:64:5 | private1 |
| private.rb:69:3:70:5 | private2 |
| private.rb:75:3:76:5 | private3 |
| private.rb:78:3:79:5 | private4 |
| private.rb:83:11:85:5 | m1 |
| private.rb:87:11:89:5 | m2 |
| private.rb:97:11:101:5 | m1 |
publicMethod
| calls.rb:7:1:9:3 | bar |
| calls.rb:13:1:15:3 | bar |
| calls.rb:22:5:24:7 | instance_m |
| calls.rb:25:5:27:7 | singleton_m |
| calls.rb:51:5:57:7 | baz |
| calls.rb:66:5:68:7 | baz |
| calls.rb:92:5:92:23 | bit_length |
| calls.rb:93:5:93:16 | abs |
| calls.rb:97:5:97:23 | capitalize |
| calls.rb:102:5:102:30 | puts |
| calls.rb:106:5:106:24 | module_eval |
| calls.rb:107:5:107:20 | include |
| calls.rb:108:5:108:20 | prepend |
| calls.rb:109:5:109:20 | private |
| calls.rb:114:5:114:16 | new |
| calls.rb:119:5:119:31 | [] |
| calls.rb:124:3:124:29 | [] |
| calls.rb:126:3:126:17 | length |
| calls.rb:128:3:134:5 | foreach |
| calls.rb:163:5:165:7 | s_method |
| calls.rb:169:5:170:7 | to_s |
| calls.rb:174:5:175:7 | to_s |
| calls.rb:188:5:191:7 | singleton_a |
| calls.rb:193:5:196:7 | singleton_b |
| calls.rb:198:5:200:7 | singleton_c |
| calls.rb:202:5:205:7 | singleton_d |
| calls.rb:207:5:212:7 | instance |
| calls.rb:208:9:210:11 | singleton_e |
| calls.rb:215:9:217:11 | singleton_f |
| calls.rb:220:5:222:7 | call_singleton_g |
| calls.rb:233:1:235:3 | singleton_g |
| calls.rb:240:1:242:3 | singleton_g |
| calls.rb:248:5:250:7 | singleton_g |
| calls.rb:264:1:266:3 | singleton_g |
| calls.rb:278:5:280:7 | singleton_h |
| calls.rb:291:5:293:7 | singleton_i |
| calls.rb:300:5:302:7 | singleton_j |
| calls.rb:308:5:311:7 | instance |
| calls.rb:313:5:315:7 | singleton |
| calls.rb:323:5:325:7 | instance |
| calls.rb:329:5:331:7 | instance |
| calls.rb:335:5:337:7 | instance |
| calls.rb:365:5:367:7 | instance |
| calls.rb:376:9:378:11 | singleton1 |
| calls.rb:380:9:382:11 | call_singleton1 |
| calls.rb:385:5:387:7 | singleton2 |
| calls.rb:389:5:391:7 | call_singleton2 |
| calls.rb:401:9:403:11 | singleton1 |
| calls.rb:406:5:408:7 | singleton2 |
| calls.rb:416:9:418:11 | m1 |
| calls.rb:421:5:433:7 | m2 |
| calls.rb:424:9:430:11 | m3 |
| calls.rb:427:13:429:15 | m4 |
| calls.rb:437:13:439:15 | m5 |
| calls.rb:478:5:480:7 | singleton |
| hello.rb:2:5:4:7 | hello |
| hello.rb:5:5:7:7 | world |
| hello.rb:13:5:15:7 | message |
| hello.rb:19:5:21:7 | message |
| modules.rb:9:5:10:7 | method_in_foo_bar |
| modules.rb:16:3:17:5 | method_in_foo |
| modules.rb:27:3:28:5 | method_in_another_definition_of_foo |
| modules.rb:38:3:39:5 | method_a |
| modules.rb:41:3:42:5 | method_b |
| modules.rb:52:3:53:5 | method_in_another_definition_of_foo_bar |
| private.rb:5:3:6:5 | public |
| private.rb:20:3:21:5 | public2 |
| private.rb:38:3:39:5 | public3 |
| private.rb:66:3:67:5 | public |
| private.rb:91:3:93:5 | call_m1 |
protectedMethod
| private.rb:32:3:33:5 | protected1 |
| private.rb:35:3:36:5 | protected2 |

View File

@@ -5,3 +5,7 @@ query Callable getTarget(Call call) { result = call.getATarget() }
query predicate unresolvedCall(Call call) { not exists(call.getATarget()) }
query predicate privateMethod(MethodBase m) { m.isPrivate() }
query predicate publicMethod(MethodBase m) { m.isPublic() }
query predicate protectedMethod(MethodBase m) { m.isProtected() }

View File

@@ -22,7 +22,7 @@ getMethod
| calls.rb:112:1:115:3 | Object | optional_arg | calls.rb:76:1:79:3 | optional_arg |
| calls.rb:112:1:115:3 | Object | pattern_dispatch | calls.rb:340:1:356:3 | pattern_dispatch |
| calls.rb:112:1:115:3 | Object | private_on_main | calls.rb:182:1:183:3 | private_on_main |
| calls.rb:112:1:115:3 | Object | private_on_main | private.rb:31:1:32:3 | private_on_main |
| calls.rb:112:1:115:3 | Object | private_on_main | private.rb:51:1:52:3 | private_on_main |
| calls.rb:117:1:120:3 | Hash | [] | calls.rb:119:5:119:31 | [] |
| calls.rb:122:1:135:3 | Array | [] | calls.rb:124:3:124:29 | [] |
| calls.rb:122:1:135:3 | Array | foreach | calls.rb:128:3:134:5 | foreach |
@@ -49,20 +49,24 @@ getMethod
| modules.rb:5:3:14:5 | Foo::Bar | method_in_foo_bar | modules.rb:9:5:10:7 | method_in_foo_bar |
| modules.rb:37:1:46:3 | Bar | method_a | modules.rb:38:3:39:5 | method_a |
| modules.rb:37:1:46:3 | Bar | method_b | modules.rb:41:3:42:5 | method_b |
| private.rb:1:1:29:3 | E | private1 | private.rb:2:11:3:5 | private1 |
| private.rb:1:1:29:3 | E | private2 | private.rb:8:3:9:5 | private2 |
| private.rb:1:1:29:3 | E | private3 | private.rb:14:3:15:5 | private3 |
| private.rb:1:1:29:3 | E | private4 | private.rb:17:3:18:5 | private4 |
| private.rb:1:1:29:3 | E | public | private.rb:5:3:6:5 | public |
| private.rb:42:1:60:3 | F | private1 | private.rb:43:11:44:5 | private1 |
| private.rb:42:1:60:3 | F | private2 | private.rb:49:3:50:5 | private2 |
| private.rb:42:1:60:3 | F | private3 | private.rb:55:3:56:5 | private3 |
| private.rb:42:1:60:3 | F | private4 | private.rb:58:3:59:5 | private4 |
| private.rb:42:1:60:3 | F | public | private.rb:46:3:47:5 | public |
| private.rb:62:1:74:3 | PrivateOverride1 | call_m1 | private.rb:71:3:73:5 | call_m1 |
| private.rb:62:1:74:3 | PrivateOverride1 | m1 | private.rb:63:11:65:5 | m1 |
| private.rb:62:1:74:3 | PrivateOverride1 | m2 | private.rb:67:11:69:5 | m2 |
| private.rb:76:1:82:3 | PrivateOverride2 | m1 | private.rb:77:11:81:5 | m1 |
| private.rb:1:1:49:3 | E | private1 | private.rb:2:11:3:5 | private1 |
| private.rb:1:1:49:3 | E | private2 | private.rb:8:3:9:5 | private2 |
| private.rb:1:1:49:3 | E | private3 | private.rb:14:3:15:5 | private3 |
| private.rb:1:1:49:3 | E | private4 | private.rb:17:3:18:5 | private4 |
| private.rb:1:1:49:3 | E | private7 | private.rb:41:3:42:5 | private7 |
| private.rb:1:1:49:3 | E | private8 | private.rb:47:3:48:5 | private8 |
| private.rb:1:1:49:3 | E | protected1 | private.rb:32:3:33:5 | protected1 |
| private.rb:1:1:49:3 | E | protected2 | private.rb:35:3:36:5 | protected2 |
| private.rb:1:1:49:3 | E | public | private.rb:5:3:6:5 | public |
| private.rb:62:1:80:3 | F | private1 | private.rb:63:11:64:5 | private1 |
| private.rb:62:1:80:3 | F | private2 | private.rb:69:3:70:5 | private2 |
| private.rb:62:1:80:3 | F | private3 | private.rb:75:3:76:5 | private3 |
| private.rb:62:1:80:3 | F | private4 | private.rb:78:3:79:5 | private4 |
| private.rb:62:1:80:3 | F | public | private.rb:66:3:67:5 | public |
| private.rb:82:1:94:3 | PrivateOverride1 | call_m1 | private.rb:91:3:93:5 | call_m1 |
| private.rb:82:1:94:3 | PrivateOverride1 | m1 | private.rb:83:11:85:5 | m1 |
| private.rb:82:1:94:3 | PrivateOverride1 | m2 | private.rb:87:11:89:5 | m2 |
| private.rb:96:1:102:3 | PrivateOverride2 | m1 | private.rb:97:11:101:5 | m1 |
lookupMethod
| calls.rb:21:1:34:3 | M | instance_m | calls.rb:22:5:24:7 | instance_m |
| calls.rb:43:1:58:3 | C | add_singleton | calls.rb:364:1:368:3 | add_singleton |
@@ -148,7 +152,7 @@ lookupMethod
| calls.rb:112:1:115:3 | Object | optional_arg | calls.rb:76:1:79:3 | optional_arg |
| calls.rb:112:1:115:3 | Object | pattern_dispatch | calls.rb:340:1:356:3 | pattern_dispatch |
| calls.rb:112:1:115:3 | Object | private_on_main | calls.rb:182:1:183:3 | private_on_main |
| calls.rb:112:1:115:3 | Object | private_on_main | private.rb:31:1:32:3 | private_on_main |
| calls.rb:112:1:115:3 | Object | private_on_main | private.rb:51:1:52:3 | private_on_main |
| calls.rb:112:1:115:3 | Object | puts | calls.rb:102:5:102:30 | puts |
| calls.rb:112:1:115:3 | Object | to_s | calls.rb:169:5:170:7 | to_s |
| calls.rb:117:1:120:3 | Hash | [] | calls.rb:119:5:119:31 | [] |
@@ -430,34 +434,38 @@ lookupMethod
| modules_rec.rb:4:1:5:3 | A::B | new | calls.rb:114:5:114:16 | new |
| modules_rec.rb:4:1:5:3 | A::B | puts | calls.rb:102:5:102:30 | puts |
| modules_rec.rb:4:1:5:3 | A::B | to_s | calls.rb:169:5:170:7 | to_s |
| private.rb:1:1:29:3 | E | new | calls.rb:114:5:114:16 | new |
| private.rb:1:1:29:3 | E | private1 | private.rb:2:11:3:5 | private1 |
| private.rb:1:1:29:3 | E | private2 | private.rb:8:3:9:5 | private2 |
| private.rb:1:1:29:3 | E | private3 | private.rb:14:3:15:5 | private3 |
| private.rb:1:1:29:3 | E | private4 | private.rb:17:3:18:5 | private4 |
| private.rb:1:1:29:3 | E | private_on_main | private.rb:31:1:32:3 | private_on_main |
| private.rb:1:1:29:3 | E | public | private.rb:5:3:6:5 | public |
| private.rb:1:1:29:3 | E | puts | calls.rb:102:5:102:30 | puts |
| private.rb:1:1:29:3 | E | to_s | calls.rb:169:5:170:7 | to_s |
| private.rb:42:1:60:3 | F | private1 | private.rb:43:11:44:5 | private1 |
| private.rb:42:1:60:3 | F | private2 | private.rb:49:3:50:5 | private2 |
| private.rb:42:1:60:3 | F | private3 | private.rb:55:3:56:5 | private3 |
| private.rb:42:1:60:3 | F | private4 | private.rb:58:3:59:5 | private4 |
| private.rb:42:1:60:3 | F | public | private.rb:46:3:47:5 | public |
| private.rb:62:1:74:3 | PrivateOverride1 | call_m1 | private.rb:71:3:73:5 | call_m1 |
| private.rb:62:1:74:3 | PrivateOverride1 | m1 | private.rb:63:11:65:5 | m1 |
| private.rb:62:1:74:3 | PrivateOverride1 | m2 | private.rb:67:11:69:5 | m2 |
| private.rb:62:1:74:3 | PrivateOverride1 | new | calls.rb:114:5:114:16 | new |
| private.rb:62:1:74:3 | PrivateOverride1 | private_on_main | private.rb:31:1:32:3 | private_on_main |
| private.rb:62:1:74:3 | PrivateOverride1 | puts | calls.rb:102:5:102:30 | puts |
| private.rb:62:1:74:3 | PrivateOverride1 | to_s | calls.rb:169:5:170:7 | to_s |
| private.rb:76:1:82:3 | PrivateOverride2 | call_m1 | private.rb:71:3:73:5 | call_m1 |
| private.rb:76:1:82:3 | PrivateOverride2 | m1 | private.rb:77:11:81:5 | m1 |
| private.rb:76:1:82:3 | PrivateOverride2 | m2 | private.rb:67:11:69:5 | m2 |
| private.rb:76:1:82:3 | PrivateOverride2 | new | calls.rb:114:5:114:16 | new |
| private.rb:76:1:82:3 | PrivateOverride2 | private_on_main | private.rb:31:1:32:3 | private_on_main |
| private.rb:76:1:82:3 | PrivateOverride2 | puts | calls.rb:102:5:102:30 | puts |
| private.rb:76:1:82:3 | PrivateOverride2 | to_s | calls.rb:169:5:170:7 | to_s |
| private.rb:1:1:49:3 | E | new | calls.rb:114:5:114:16 | new |
| private.rb:1:1:49:3 | E | private1 | private.rb:2:11:3:5 | private1 |
| private.rb:1:1:49:3 | E | private2 | private.rb:8:3:9:5 | private2 |
| private.rb:1:1:49:3 | E | private3 | private.rb:14:3:15:5 | private3 |
| private.rb:1:1:49:3 | E | private4 | private.rb:17:3:18:5 | private4 |
| private.rb:1:1:49:3 | E | private7 | private.rb:41:3:42:5 | private7 |
| private.rb:1:1:49:3 | E | private8 | private.rb:47:3:48:5 | private8 |
| private.rb:1:1:49:3 | E | private_on_main | private.rb:51:1:52:3 | private_on_main |
| private.rb:1:1:49:3 | E | protected1 | private.rb:32:3:33:5 | protected1 |
| private.rb:1:1:49:3 | E | protected2 | private.rb:35:3:36:5 | protected2 |
| private.rb:1:1:49:3 | E | public | private.rb:5:3:6:5 | public |
| private.rb:1:1:49:3 | E | puts | calls.rb:102:5:102:30 | puts |
| private.rb:1:1:49:3 | E | to_s | calls.rb:169:5:170:7 | to_s |
| private.rb:62:1:80:3 | F | private1 | private.rb:63:11:64:5 | private1 |
| private.rb:62:1:80:3 | F | private2 | private.rb:69:3:70:5 | private2 |
| private.rb:62:1:80:3 | F | private3 | private.rb:75:3:76:5 | private3 |
| private.rb:62:1:80:3 | F | private4 | private.rb:78:3:79:5 | private4 |
| private.rb:62:1:80:3 | F | public | private.rb:66:3:67:5 | public |
| private.rb:82:1:94:3 | PrivateOverride1 | call_m1 | private.rb:91:3:93:5 | call_m1 |
| private.rb:82:1:94:3 | PrivateOverride1 | m1 | private.rb:83:11:85:5 | m1 |
| private.rb:82:1:94:3 | PrivateOverride1 | m2 | private.rb:87:11:89:5 | m2 |
| private.rb:82:1:94:3 | PrivateOverride1 | new | calls.rb:114:5:114:16 | new |
| private.rb:82:1:94:3 | PrivateOverride1 | private_on_main | private.rb:51:1:52:3 | private_on_main |
| private.rb:82:1:94:3 | PrivateOverride1 | puts | calls.rb:102:5:102:30 | puts |
| private.rb:82:1:94:3 | PrivateOverride1 | to_s | calls.rb:169:5:170:7 | to_s |
| private.rb:96:1:102:3 | PrivateOverride2 | call_m1 | private.rb:91:3:93:5 | call_m1 |
| private.rb:96:1:102:3 | PrivateOverride2 | m1 | private.rb:97:11:101:5 | m1 |
| private.rb:96:1:102:3 | PrivateOverride2 | m2 | private.rb:87:11:89:5 | m2 |
| private.rb:96:1:102:3 | PrivateOverride2 | new | calls.rb:114:5:114:16 | new |
| private.rb:96:1:102:3 | PrivateOverride2 | private_on_main | private.rb:51:1:52:3 | private_on_main |
| private.rb:96:1:102:3 | PrivateOverride2 | puts | calls.rb:102:5:102:30 | puts |
| private.rb:96:1:102:3 | PrivateOverride2 | to_s | calls.rb:169:5:170:7 | to_s |
enclosingMethod
| calls.rb:2:5:2:14 | call to puts | calls.rb:1:1:3:3 | foo |
| calls.rb:2:5:2:14 | self | calls.rb:1:1:3:3 | foo |
@@ -781,22 +789,22 @@ enclosingMethod
| hello.rb:20:30:20:34 | self | hello.rb:19:5:21:7 | message |
| hello.rb:20:38:20:40 | "!" | hello.rb:19:5:21:7 | message |
| hello.rb:20:39:20:39 | ! | hello.rb:19:5:21:7 | message |
| private.rb:64:7:64:32 | call to puts | private.rb:63:11:65:5 | m1 |
| private.rb:64:7:64:32 | self | private.rb:63:11:65:5 | m1 |
| private.rb:64:12:64:32 | "PrivateOverride1#m1" | private.rb:63:11:65:5 | m1 |
| private.rb:64:13:64:31 | PrivateOverride1#m1 | private.rb:63:11:65:5 | m1 |
| private.rb:68:7:68:32 | call to puts | private.rb:67:11:69:5 | m2 |
| private.rb:68:7:68:32 | self | private.rb:67:11:69:5 | m2 |
| private.rb:68:12:68:32 | "PrivateOverride1#m2" | private.rb:67:11:69:5 | m2 |
| private.rb:68:13:68:31 | PrivateOverride1#m2 | private.rb:67:11:69:5 | m2 |
| private.rb:72:7:72:8 | call to m1 | private.rb:71:3:73:5 | call_m1 |
| private.rb:72:7:72:8 | self | private.rb:71:3:73:5 | call_m1 |
| private.rb:78:7:78:32 | call to puts | private.rb:77:11:81:5 | m1 |
| private.rb:78:7:78:32 | self | private.rb:77:11:81:5 | m1 |
| private.rb:78:12:78:32 | "PrivateOverride2#m1" | private.rb:77:11:81:5 | m1 |
| private.rb:78:13:78:31 | PrivateOverride2#m1 | private.rb:77:11:81:5 | m1 |
| private.rb:79:7:79:8 | call to m2 | private.rb:77:11:81:5 | m1 |
| private.rb:79:7:79:8 | self | private.rb:77:11:81:5 | m1 |
| private.rb:80:7:80:22 | PrivateOverride1 | private.rb:77:11:81:5 | m1 |
| private.rb:80:7:80:26 | call to new | private.rb:77:11:81:5 | m1 |
| private.rb:80:7:80:29 | call to m1 | private.rb:77:11:81:5 | m1 |
| private.rb:84:7:84:32 | call to puts | private.rb:83:11:85:5 | m1 |
| private.rb:84:7:84:32 | self | private.rb:83:11:85:5 | m1 |
| private.rb:84:12:84:32 | "PrivateOverride1#m1" | private.rb:83:11:85:5 | m1 |
| private.rb:84:13:84:31 | PrivateOverride1#m1 | private.rb:83:11:85:5 | m1 |
| private.rb:88:7:88:32 | call to puts | private.rb:87:11:89:5 | m2 |
| private.rb:88:7:88:32 | self | private.rb:87:11:89:5 | m2 |
| private.rb:88:12:88:32 | "PrivateOverride1#m2" | private.rb:87:11:89:5 | m2 |
| private.rb:88:13:88:31 | PrivateOverride1#m2 | private.rb:87:11:89:5 | m2 |
| private.rb:92:7:92:8 | call to m1 | private.rb:91:3:93:5 | call_m1 |
| private.rb:92:7:92:8 | self | private.rb:91:3:93:5 | call_m1 |
| private.rb:98:7:98:32 | call to puts | private.rb:97:11:101:5 | m1 |
| private.rb:98:7:98:32 | self | private.rb:97:11:101:5 | m1 |
| private.rb:98:12:98:32 | "PrivateOverride2#m1" | private.rb:97:11:101:5 | m1 |
| private.rb:98:13:98:31 | PrivateOverride2#m1 | private.rb:97:11:101:5 | m1 |
| private.rb:99:7:99:8 | call to m2 | private.rb:97:11:101:5 | m1 |
| private.rb:99:7:99:8 | self | private.rb:97:11:101:5 | m1 |
| private.rb:100:7:100:22 | PrivateOverride1 | private.rb:97:11:101:5 | m1 |
| private.rb:100:7:100:26 | call to new | private.rb:97:11:101:5 | m1 |
| private.rb:100:7:100:29 | call to m1 | private.rb:97:11:101:5 | m1 |

View File

@@ -67,10 +67,10 @@ getModule
| modules.rb:123:1:124:3 | Test::Foo1::Bar::Baz |
| modules_rec.rb:1:1:2:3 | B::A |
| modules_rec.rb:4:1:5:3 | A::B |
| private.rb:1:1:29:3 | E |
| private.rb:42:1:60:3 | F |
| private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:76:1:82:3 | PrivateOverride2 |
| private.rb:1:1:49:3 | E |
| private.rb:62:1:80:3 | F |
| private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:96:1:102:3 | PrivateOverride2 |
getADeclaration
| calls.rb:21:1:34:3 | M | calls.rb:21:1:34:3 | M |
| calls.rb:43:1:58:3 | C | calls.rb:43:1:58:3 | C |
@@ -84,7 +84,7 @@ getADeclaration
| calls.rb:112:1:115:3 | Object | hello.rb:1:1:22:3 | hello.rb |
| calls.rb:112:1:115:3 | Object | modules.rb:1:1:129:4 | modules.rb |
| calls.rb:112:1:115:3 | Object | modules_rec.rb:1:1:11:26 | modules_rec.rb |
| calls.rb:112:1:115:3 | Object | private.rb:1:1:85:40 | private.rb |
| calls.rb:112:1:115:3 | Object | private.rb:1:1:105:40 | private.rb |
| calls.rb:117:1:120:3 | Hash | calls.rb:117:1:120:3 | Hash |
| calls.rb:122:1:135:3 | Array | calls.rb:122:1:135:3 | Array |
| calls.rb:162:1:166:3 | S | calls.rb:162:1:166:3 | S |
@@ -138,10 +138,10 @@ getADeclaration
| modules.rb:123:1:124:3 | Test::Foo1::Bar::Baz | modules.rb:123:1:124:3 | Baz |
| modules_rec.rb:1:1:2:3 | B::A | modules_rec.rb:1:1:2:3 | A |
| modules_rec.rb:4:1:5:3 | A::B | modules_rec.rb:4:1:5:3 | B |
| private.rb:1:1:29:3 | E | private.rb:1:1:29:3 | E |
| private.rb:42:1:60:3 | F | private.rb:42:1:60:3 | F |
| private.rb:62:1:74:3 | PrivateOverride1 | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:76:1:82:3 | PrivateOverride2 | private.rb:76:1:82:3 | PrivateOverride2 |
| private.rb:1:1:49:3 | E | private.rb:1:1:49:3 | E |
| private.rb:62:1:80:3 | F | private.rb:62:1:80:3 | F |
| private.rb:82:1:94:3 | PrivateOverride1 | private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:96:1:102:3 | PrivateOverride2 | private.rb:96:1:102:3 | PrivateOverride2 |
getSuperClass
| calls.rb:43:1:58:3 | C | calls.rb:112:1:115:3 | Object |
| calls.rb:65:1:69:3 | D | calls.rb:43:1:58:3 | C |
@@ -184,9 +184,9 @@ getSuperClass
| modules.rb:116:7:117:9 | XX::YY | modules.rb:112:1:113:3 | YY |
| modules_rec.rb:1:1:2:3 | B::A | calls.rb:112:1:115:3 | Object |
| modules_rec.rb:4:1:5:3 | A::B | calls.rb:112:1:115:3 | Object |
| private.rb:1:1:29:3 | E | calls.rb:112:1:115:3 | Object |
| private.rb:62:1:74:3 | PrivateOverride1 | calls.rb:112:1:115:3 | Object |
| private.rb:76:1:82:3 | PrivateOverride2 | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:1:1:49:3 | E | calls.rb:112:1:115:3 | Object |
| private.rb:82:1:94:3 | PrivateOverride1 | calls.rb:112:1:115:3 | Object |
| private.rb:96:1:102:3 | PrivateOverride2 | private.rb:82:1:94:3 | PrivateOverride1 |
getAPrependedModule
| calls.rb:112:1:115:3 | Object | calls.rb:168:1:171:3 | A |
| calls.rb:168:1:171:3 | A | modules_rec.rb:4:1:5:3 | A::B |
@@ -286,15 +286,15 @@ resolveConstantReadAccess
| modules_rec.rb:7:11:7:11 | B | B |
| modules_rec.rb:8:11:8:11 | B | A::B |
| modules_rec.rb:11:9:11:9 | A | A |
| private.rb:34:1:34:1 | E | E |
| private.rb:35:1:35:1 | E | E |
| private.rb:36:1:36:1 | E | E |
| private.rb:37:1:37:1 | E | E |
| private.rb:38:1:38:1 | E | E |
| private.rb:76:26:76:41 | PrivateOverride1 | PrivateOverride1 |
| private.rb:80:7:80:22 | PrivateOverride1 | PrivateOverride1 |
| private.rb:84:1:84:16 | PrivateOverride2 | PrivateOverride2 |
| private.rb:85:1:85:16 | PrivateOverride2 | PrivateOverride2 |
| private.rb:54:1:54:1 | E | E |
| private.rb:55:1:55:1 | E | E |
| private.rb:56:1:56:1 | E | E |
| private.rb:57:1:57:1 | E | E |
| private.rb:58:1:58:1 | E | E |
| private.rb:96:26:96:41 | PrivateOverride1 | PrivateOverride1 |
| private.rb:100:7:100:22 | PrivateOverride1 | PrivateOverride1 |
| private.rb:104:1:104:16 | PrivateOverride2 | PrivateOverride2 |
| private.rb:105:1:105:16 | PrivateOverride2 | PrivateOverride2 |
resolveConstantWriteAccess
| calls.rb:21:1:34:3 | M | M |
| calls.rb:43:1:58:3 | C | C |
@@ -368,10 +368,10 @@ resolveConstantWriteAccess
| modules_rec.rb:1:1:2:3 | A | B::A |
| modules_rec.rb:4:1:5:3 | B | A::B |
| modules_rec.rb:7:1:9:3 | A | A |
| private.rb:1:1:29:3 | E | E |
| private.rb:42:1:60:3 | F | F |
| private.rb:62:1:74:3 | PrivateOverride1 | PrivateOverride1 |
| private.rb:76:1:82:3 | PrivateOverride2 | PrivateOverride2 |
| private.rb:1:1:49:3 | E | E |
| private.rb:62:1:80:3 | F | F |
| private.rb:82:1:94:3 | PrivateOverride1 | PrivateOverride1 |
| private.rb:96:1:102:3 | PrivateOverride2 | PrivateOverride2 |
enclosingModule
| calls.rb:1:1:3:3 | foo | calls.rb:1:1:485:62 | calls.rb |
| calls.rb:2:5:2:14 | call to puts | calls.rb:1:1:485:62 | calls.rb |
@@ -1327,99 +1327,113 @@ enclosingModule
| modules_rec.rb:11:1:11:9 | call to prepend | modules_rec.rb:1:1:11:26 | modules_rec.rb |
| modules_rec.rb:11:1:11:9 | self | modules_rec.rb:1:1:11:26 | modules_rec.rb |
| modules_rec.rb:11:9:11:9 | A | modules_rec.rb:1:1:11:26 | modules_rec.rb |
| private.rb:1:1:29:3 | E | private.rb:1:1:85:40 | private.rb |
| private.rb:2:3:3:5 | call to private | private.rb:1:1:29:3 | E |
| private.rb:2:3:3:5 | self | private.rb:1:1:29:3 | E |
| private.rb:2:11:3:5 | private1 | private.rb:1:1:29:3 | E |
| private.rb:5:3:6:5 | public | private.rb:1:1:29:3 | E |
| private.rb:8:3:9:5 | private2 | private.rb:1:1:29:3 | E |
| private.rb:10:3:10:19 | call to private | private.rb:1:1:29:3 | E |
| private.rb:10:3:10:19 | self | private.rb:1:1:29:3 | E |
| private.rb:10:11:10:19 | :private2 | private.rb:1:1:29:3 | E |
| private.rb:10:11:10:19 | private2 | private.rb:1:1:29:3 | E |
| private.rb:12:3:12:9 | call to private | private.rb:1:1:29:3 | E |
| private.rb:12:3:12:9 | self | private.rb:1:1:29:3 | E |
| private.rb:14:3:15:5 | private3 | private.rb:1:1:29:3 | E |
| private.rb:17:3:18:5 | private4 | private.rb:1:1:29:3 | E |
| private.rb:20:3:21:5 | public2 | private.rb:1:1:29:3 | E |
| private.rb:20:7:20:10 | self | private.rb:1:1:29:3 | E |
| private.rb:23:3:24:5 | call to private_class_method | private.rb:1:1:29:3 | E |
| private.rb:23:3:24:5 | self | private.rb:1:1:29:3 | E |
| private.rb:23:24:24:5 | private5 | private.rb:1:1:29:3 | E |
| private.rb:23:28:23:31 | self | private.rb:1:1:29:3 | E |
| private.rb:26:3:27:5 | private6 | private.rb:1:1:29:3 | E |
| private.rb:26:7:26:10 | self | private.rb:1:1:29:3 | E |
| private.rb:28:3:28:32 | call to private_class_method | private.rb:1:1:29:3 | E |
| private.rb:28:3:28:32 | self | private.rb:1:1:29:3 | E |
| private.rb:28:24:28:32 | :private6 | private.rb:1:1:29:3 | E |
| private.rb:28:24:28:32 | private6 | private.rb:1:1:29:3 | E |
| private.rb:31:1:32:3 | private_on_main | private.rb:1:1:85:40 | private.rb |
| private.rb:34:1:34:1 | E | private.rb:1:1:85:40 | private.rb |
| private.rb:34:1:34:5 | call to new | private.rb:1:1:85:40 | private.rb |
| private.rb:34:1:34:14 | call to private1 | private.rb:1:1:85:40 | private.rb |
| private.rb:35:1:35:1 | E | private.rb:1:1:85:40 | private.rb |
| private.rb:35:1:35:5 | call to new | private.rb:1:1:85:40 | private.rb |
| private.rb:35:1:35:14 | call to private2 | private.rb:1:1:85:40 | private.rb |
| private.rb:36:1:36:1 | E | private.rb:1:1:85:40 | private.rb |
| private.rb:36:1:36:5 | call to new | private.rb:1:1:85:40 | private.rb |
| private.rb:36:1:36:14 | call to private3 | private.rb:1:1:85:40 | private.rb |
| private.rb:37:1:37:1 | E | private.rb:1:1:85:40 | private.rb |
| private.rb:37:1:37:5 | call to new | private.rb:1:1:85:40 | private.rb |
| private.rb:37:1:37:14 | call to private4 | private.rb:1:1:85:40 | private.rb |
| private.rb:38:1:38:1 | E | private.rb:1:1:85:40 | private.rb |
| private.rb:38:1:38:5 | call to new | private.rb:1:1:85:40 | private.rb |
| private.rb:38:1:38:12 | call to public | private.rb:1:1:85:40 | private.rb |
| private.rb:40:1:40:15 | call to private_on_main | private.rb:1:1:85:40 | private.rb |
| private.rb:40:1:40:15 | self | private.rb:1:1:85:40 | private.rb |
| private.rb:42:1:60:3 | F | private.rb:1:1:85:40 | private.rb |
| private.rb:43:3:44:5 | call to private | private.rb:42:1:60:3 | F |
| private.rb:43:3:44:5 | self | private.rb:42:1:60:3 | F |
| private.rb:43:11:44:5 | private1 | private.rb:42:1:60:3 | F |
| private.rb:46:3:47:5 | public | private.rb:42:1:60:3 | F |
| private.rb:49:3:50:5 | private2 | private.rb:42:1:60:3 | F |
| private.rb:51:3:51:19 | call to private | private.rb:42:1:60:3 | F |
| private.rb:51:3:51:19 | self | private.rb:42:1:60:3 | F |
| private.rb:51:11:51:19 | :private2 | private.rb:42:1:60:3 | F |
| private.rb:51:11:51:19 | private2 | private.rb:42:1:60:3 | F |
| private.rb:53:3:53:9 | call to private | private.rb:42:1:60:3 | F |
| private.rb:53:3:53:9 | self | private.rb:42:1:60:3 | F |
| private.rb:55:3:56:5 | private3 | private.rb:42:1:60:3 | F |
| private.rb:58:3:59:5 | private4 | private.rb:42:1:60:3 | F |
| private.rb:62:1:74:3 | PrivateOverride1 | private.rb:1:1:85:40 | private.rb |
| private.rb:63:3:65:5 | call to private | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:63:3:65:5 | self | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:63:11:65:5 | m1 | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:64:7:64:32 | call to puts | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:64:7:64:32 | self | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:64:12:64:32 | "PrivateOverride1#m1" | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:64:13:64:31 | PrivateOverride1#m1 | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:67:3:69:5 | call to private | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:67:3:69:5 | self | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:67:11:69:5 | m2 | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:68:7:68:32 | call to puts | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:68:7:68:32 | self | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:68:12:68:32 | "PrivateOverride1#m2" | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:68:13:68:31 | PrivateOverride1#m2 | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:71:3:73:5 | call_m1 | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:72:7:72:8 | call to m1 | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:72:7:72:8 | self | private.rb:62:1:74:3 | PrivateOverride1 |
| private.rb:76:1:82:3 | PrivateOverride2 | private.rb:1:1:85:40 | private.rb |
| private.rb:76:26:76:41 | PrivateOverride1 | private.rb:1:1:85:40 | private.rb |
| private.rb:77:3:81:5 | call to private | private.rb:76:1:82:3 | PrivateOverride2 |
| private.rb:77:3:81:5 | self | private.rb:76:1:82:3 | PrivateOverride2 |
| private.rb:77:11:81:5 | m1 | private.rb:76:1:82:3 | PrivateOverride2 |
| private.rb:78:7:78:32 | call to puts | private.rb:76:1:82:3 | PrivateOverride2 |
| private.rb:78:7:78:32 | self | private.rb:76:1:82:3 | PrivateOverride2 |
| private.rb:78:12:78:32 | "PrivateOverride2#m1" | private.rb:76:1:82:3 | PrivateOverride2 |
| private.rb:78:13:78:31 | PrivateOverride2#m1 | private.rb:76:1:82:3 | PrivateOverride2 |
| private.rb:79:7:79:8 | call to m2 | private.rb:76:1:82:3 | PrivateOverride2 |
| private.rb:79:7:79:8 | self | private.rb:76:1:82:3 | PrivateOverride2 |
| private.rb:80:7:80:22 | PrivateOverride1 | private.rb:76:1:82:3 | PrivateOverride2 |
| private.rb:80:7:80:26 | call to new | private.rb:76:1:82:3 | PrivateOverride2 |
| private.rb:80:7:80:29 | call to m1 | private.rb:76:1:82:3 | PrivateOverride2 |
| private.rb:84:1:84:16 | PrivateOverride2 | private.rb:1:1:85:40 | private.rb |
| private.rb:84:1:84:20 | call to new | private.rb:1:1:85:40 | private.rb |
| private.rb:84:1:84:28 | call to call_m1 | private.rb:1:1:85:40 | private.rb |
| private.rb:85:1:85:16 | PrivateOverride2 | private.rb:1:1:85:40 | private.rb |
| private.rb:85:1:85:20 | call to new | private.rb:1:1:85:40 | private.rb |
| private.rb:85:1:85:23 | call to m1 | private.rb:1:1:85:40 | private.rb |
| private.rb:1:1:49:3 | E | private.rb:1:1:105:40 | private.rb |
| private.rb:2:3:3:5 | call to private | private.rb:1:1:49:3 | E |
| private.rb:2:3:3:5 | self | private.rb:1:1:49:3 | E |
| private.rb:2:11:3:5 | private1 | private.rb:1:1:49:3 | E |
| private.rb:5:3:6:5 | public | private.rb:1:1:49:3 | E |
| private.rb:8:3:9:5 | private2 | private.rb:1:1:49:3 | E |
| private.rb:10:3:10:19 | call to private | private.rb:1:1:49:3 | E |
| private.rb:10:3:10:19 | self | private.rb:1:1:49:3 | E |
| private.rb:10:11:10:19 | :private2 | private.rb:1:1:49:3 | E |
| private.rb:10:11:10:19 | private2 | private.rb:1:1:49:3 | E |
| private.rb:12:3:12:9 | call to private | private.rb:1:1:49:3 | E |
| private.rb:12:3:12:9 | self | private.rb:1:1:49:3 | E |
| private.rb:14:3:15:5 | private3 | private.rb:1:1:49:3 | E |
| private.rb:17:3:18:5 | private4 | private.rb:1:1:49:3 | E |
| private.rb:20:3:21:5 | public2 | private.rb:1:1:49:3 | E |
| private.rb:20:7:20:10 | self | private.rb:1:1:49:3 | E |
| private.rb:23:3:24:5 | call to private_class_method | private.rb:1:1:49:3 | E |
| private.rb:23:3:24:5 | self | private.rb:1:1:49:3 | E |
| private.rb:23:24:24:5 | private5 | private.rb:1:1:49:3 | E |
| private.rb:23:28:23:31 | self | private.rb:1:1:49:3 | E |
| private.rb:26:3:27:5 | private6 | private.rb:1:1:49:3 | E |
| private.rb:26:7:26:10 | self | private.rb:1:1:49:3 | E |
| private.rb:28:3:28:32 | call to private_class_method | private.rb:1:1:49:3 | E |
| private.rb:28:3:28:32 | self | private.rb:1:1:49:3 | E |
| private.rb:28:24:28:32 | :private6 | private.rb:1:1:49:3 | E |
| private.rb:28:24:28:32 | private6 | private.rb:1:1:49:3 | E |
| private.rb:30:3:30:11 | call to protected | private.rb:1:1:49:3 | E |
| private.rb:30:3:30:11 | self | private.rb:1:1:49:3 | E |
| private.rb:32:3:33:5 | protected1 | private.rb:1:1:49:3 | E |
| private.rb:35:3:36:5 | protected2 | private.rb:1:1:49:3 | E |
| private.rb:38:3:39:5 | public3 | private.rb:1:1:49:3 | E |
| private.rb:38:7:38:10 | self | private.rb:1:1:49:3 | E |
| private.rb:41:3:42:5 | private7 | private.rb:1:1:49:3 | E |
| private.rb:43:3:43:19 | call to private | private.rb:1:1:49:3 | E |
| private.rb:43:3:43:19 | self | private.rb:1:1:49:3 | E |
| private.rb:43:11:43:19 | :private7 | private.rb:1:1:49:3 | E |
| private.rb:43:11:43:19 | private7 | private.rb:1:1:49:3 | E |
| private.rb:45:3:45:9 | call to private | private.rb:1:1:49:3 | E |
| private.rb:45:3:45:9 | self | private.rb:1:1:49:3 | E |
| private.rb:47:3:48:5 | private8 | private.rb:1:1:49:3 | E |
| private.rb:51:1:52:3 | private_on_main | private.rb:1:1:105:40 | private.rb |
| private.rb:54:1:54:1 | E | private.rb:1:1:105:40 | private.rb |
| private.rb:54:1:54:5 | call to new | private.rb:1:1:105:40 | private.rb |
| private.rb:54:1:54:14 | call to private1 | private.rb:1:1:105:40 | private.rb |
| private.rb:55:1:55:1 | E | private.rb:1:1:105:40 | private.rb |
| private.rb:55:1:55:5 | call to new | private.rb:1:1:105:40 | private.rb |
| private.rb:55:1:55:14 | call to private2 | private.rb:1:1:105:40 | private.rb |
| private.rb:56:1:56:1 | E | private.rb:1:1:105:40 | private.rb |
| private.rb:56:1:56:5 | call to new | private.rb:1:1:105:40 | private.rb |
| private.rb:56:1:56:14 | call to private3 | private.rb:1:1:105:40 | private.rb |
| private.rb:57:1:57:1 | E | private.rb:1:1:105:40 | private.rb |
| private.rb:57:1:57:5 | call to new | private.rb:1:1:105:40 | private.rb |
| private.rb:57:1:57:14 | call to private4 | private.rb:1:1:105:40 | private.rb |
| private.rb:58:1:58:1 | E | private.rb:1:1:105:40 | private.rb |
| private.rb:58:1:58:5 | call to new | private.rb:1:1:105:40 | private.rb |
| private.rb:58:1:58:12 | call to public | private.rb:1:1:105:40 | private.rb |
| private.rb:60:1:60:15 | call to private_on_main | private.rb:1:1:105:40 | private.rb |
| private.rb:60:1:60:15 | self | private.rb:1:1:105:40 | private.rb |
| private.rb:62:1:80:3 | F | private.rb:1:1:105:40 | private.rb |
| private.rb:63:3:64:5 | call to private | private.rb:62:1:80:3 | F |
| private.rb:63:3:64:5 | self | private.rb:62:1:80:3 | F |
| private.rb:63:11:64:5 | private1 | private.rb:62:1:80:3 | F |
| private.rb:66:3:67:5 | public | private.rb:62:1:80:3 | F |
| private.rb:69:3:70:5 | private2 | private.rb:62:1:80:3 | F |
| private.rb:71:3:71:19 | call to private | private.rb:62:1:80:3 | F |
| private.rb:71:3:71:19 | self | private.rb:62:1:80:3 | F |
| private.rb:71:11:71:19 | :private2 | private.rb:62:1:80:3 | F |
| private.rb:71:11:71:19 | private2 | private.rb:62:1:80:3 | F |
| private.rb:73:3:73:9 | call to private | private.rb:62:1:80:3 | F |
| private.rb:73:3:73:9 | self | private.rb:62:1:80:3 | F |
| private.rb:75:3:76:5 | private3 | private.rb:62:1:80:3 | F |
| private.rb:78:3:79:5 | private4 | private.rb:62:1:80:3 | F |
| private.rb:82:1:94:3 | PrivateOverride1 | private.rb:1:1:105:40 | private.rb |
| private.rb:83:3:85:5 | call to private | private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:83:3:85:5 | self | private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:83:11:85:5 | m1 | private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:84:7:84:32 | call to puts | private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:84:7:84:32 | self | private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:84:12:84:32 | "PrivateOverride1#m1" | private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:84:13:84:31 | PrivateOverride1#m1 | private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:87:3:89:5 | call to private | private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:87:3:89:5 | self | private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:87:11:89:5 | m2 | private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:88:7:88:32 | call to puts | private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:88:7:88:32 | self | private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:88:12:88:32 | "PrivateOverride1#m2" | private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:88:13:88:31 | PrivateOverride1#m2 | private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:91:3:93:5 | call_m1 | private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:92:7:92:8 | call to m1 | private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:92:7:92:8 | self | private.rb:82:1:94:3 | PrivateOverride1 |
| private.rb:96:1:102:3 | PrivateOverride2 | private.rb:1:1:105:40 | private.rb |
| private.rb:96:26:96:41 | PrivateOverride1 | private.rb:1:1:105:40 | private.rb |
| private.rb:97:3:101:5 | call to private | private.rb:96:1:102:3 | PrivateOverride2 |
| private.rb:97:3:101:5 | self | private.rb:96:1:102:3 | PrivateOverride2 |
| private.rb:97:11:101:5 | m1 | private.rb:96:1:102:3 | PrivateOverride2 |
| private.rb:98:7:98:32 | call to puts | private.rb:96:1:102:3 | PrivateOverride2 |
| private.rb:98:7:98:32 | self | private.rb:96:1:102:3 | PrivateOverride2 |
| private.rb:98:12:98:32 | "PrivateOverride2#m1" | private.rb:96:1:102:3 | PrivateOverride2 |
| private.rb:98:13:98:31 | PrivateOverride2#m1 | private.rb:96:1:102:3 | PrivateOverride2 |
| private.rb:99:7:99:8 | call to m2 | private.rb:96:1:102:3 | PrivateOverride2 |
| private.rb:99:7:99:8 | self | private.rb:96:1:102:3 | PrivateOverride2 |
| private.rb:100:7:100:22 | PrivateOverride1 | private.rb:96:1:102:3 | PrivateOverride2 |
| private.rb:100:7:100:26 | call to new | private.rb:96:1:102:3 | PrivateOverride2 |
| private.rb:100:7:100:29 | call to m1 | private.rb:96:1:102:3 | PrivateOverride2 |
| private.rb:104:1:104:16 | PrivateOverride2 | private.rb:1:1:105:40 | private.rb |
| private.rb:104:1:104:20 | call to new | private.rb:1:1:105:40 | private.rb |
| private.rb:104:1:104:28 | call to call_m1 | private.rb:1:1:105:40 | private.rb |
| private.rb:105:1:105:16 | PrivateOverride2 | private.rb:1:1:105:40 | private.rb |
| private.rb:105:1:105:20 | call to new | private.rb:1:1:105:40 | private.rb |
| private.rb:105:1:105:23 | call to m1 | private.rb:1:1:105:40 | private.rb |

View File

@@ -26,6 +26,26 @@ class E
def self.private6
end
private_class_method :private6
protected
def protected1
end
def protected2
end
def self.public3
end
def private7
end
private :private7
private
def private8
end
end
def private_on_main

View File

@@ -183,10 +183,10 @@ private.rb:
# 1| E
#-----| -> Object
# 42| F
# 62| F
# 62| PrivateOverride1
# 82| PrivateOverride1
#-----| -> Object
# 76| PrivateOverride2
# 96| PrivateOverride2
#-----| -> PrivateOverride1