File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5196,6 +5196,22 @@ rb_file_s_extname(VALUE klass, VALUE fname)
51965196 * File.path(File::NULL) #=> "/dev/null"
51975197 * File.path(Pathname.new("/tmp")) #=> "/tmp"
51985198 *
5199+ * If +path+ is not a String:
5200+ *
5201+ * 1. If it has the +to_path+ method, that method will be called to
5202+ * coerce to a String.
5203+ *
5204+ * 2. Otherwise, or if the coerced result is not a String too, the
5205+ * standard coersion using +to_str+ method will take place on that
5206+ * object. (See also String.try_convert)
5207+ *
5208+ * The coerced string must satisfy the following conditions:
5209+ *
5210+ * 1. It must be in an ASCII-compatible encoding; otherwise, an
5211+ * Encoding::CompatibilityError is raised.
5212+ *
5213+ * 2. It must not contain the NUL character (<tt>\0</tt>); otherwise,
5214+ * an ArgumentError is raised.
51995215 */
52005216
52015217static VALUE
You can’t perform that action at this time.
0 commit comments