File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3211,10 +3211,18 @@ rb_method_entry_location(const rb_method_entry_t *me)
32113211
32123212/*
32133213 * call-seq:
3214- * meth. source_location -> [String, Integer]
3214+ * source_location -> location
32153215 *
3216- * Returns the Ruby source filename and line number containing this method
3217- * or nil if this method was not defined in Ruby (i.e. native).
3216+ * Returns a two-element array containing the Ruby source filename
3217+ * as a string and the line number integer where +self+ is defined:
3218+ *
3219+ * def greeting = "hello"
3220+ * method(:greeting).source_location # => ["test.rb", 1]
3221+ *
3222+ * Returns nil if +self+ is not a method defined in Ruby (i.e. defined
3223+ * using native code):
3224+ *
3225+ * Kernel.method(:puts).source_location # => nil
32183226 */
32193227
32203228VALUE
You can’t perform that action at this time.
0 commit comments