るりまサーチ

最速Rubyリファレンスマニュアル検索!
48件ヒット [1-48件を表示] (0.053秒)
トップページ > クエリ:p[x] > クラス:Pathname[x] > クエリ:==[x]

別のキーワード

  1. openssl p=
  2. openssl p
  3. fileutils mkdir_p
  4. dh p=
  5. dh p

ライブラリ

キーワード

検索結果

Pathname#==(other) -> bool (21137.0)

パス名を比較し、 other と同じなら真を返します。大文字小文字は区別されます。 other は Pathname オブジェクトでなければなりません。

...other は Pathname オブジェクトでなければなりません。

パス名の比較は単純にパス文字列の比較によって行われるので、論理的に
同じパスでもパス文字列が違えば異なると判断されます。

@param other 比較対象の Pathname オブジ...
...ェクトを指定します。

//emlist[例][ruby]{
require 'pathname'

p
Pathname.new("foo/bar") == Pathname.new("foo/bar")
p
Pathname.new("foo/bar") == Pathname.new("foo//bar")
p
Pathname.new("foo/../foo/bar") == Pathname.new("foo/bar")

# => true
# false
# false
//}...

Pathname#===(other) -> bool (12237.0)

パス名を比較し、 other と同じなら真を返します。大文字小文字は区別されます。 other は Pathname オブジェクトでなければなりません。

...other は Pathname オブジェクトでなければなりません。

パス名の比較は単純にパス文字列の比較によって行われるので、論理的に
同じパスでもパス文字列が違えば異なると判断されます。

@param other 比較対象の Pathname オブジ...
...ェクトを指定します。

//emlist[例][ruby]{
require 'pathname'

p
Pathname.new("foo/bar") == Pathname.new("foo/bar")
p
Pathname.new("foo/bar") == Pathname.new("foo//bar")
p
Pathname.new("foo/../foo/bar") == Pathname.new("foo/bar")

# => true
# false
# false
//}...

Pathname#eql?(other) -> bool (6037.0)

パス名を比較し、 other と同じなら真を返します。大文字小文字は区別されます。 other は Pathname オブジェクトでなければなりません。

...other は Pathname オブジェクトでなければなりません。

パス名の比較は単純にパス文字列の比較によって行われるので、論理的に
同じパスでもパス文字列が違えば異なると判断されます。

@param other 比較対象の Pathname オブジ...
...ェクトを指定します。

//emlist[例][ruby]{
require 'pathname'

p
Pathname.new("foo/bar") == Pathname.new("foo/bar")
p
Pathname.new("foo/bar") == Pathname.new("foo//bar")
p
Pathname.new("foo/../foo/bar") == Pathname.new("foo/bar")

# => true
# false
# false
//}...

Pathname#join(*args) -> Pathname (3107.0)

与えられたパス名を連結します。

...ます。

@param args 連結したいディレクトリ名やファイル名を文字列で与えます。

//emlist[例][ruby]{
require "pathname"

p
ath0 = Pathname("/usr") # Pathname:/usr
p
ath0 = path0.join("bin/ruby") # Pathname:/usr/bin/ruby
# 上記の path0 の処...
...理は下記の path1 と同様のパスになります
p
ath1 = Pathname("/usr") + "bin/ruby" # Pathname:/usr/bin/ruby
p
ath0 == path1 #=> true
//}...