42件ヒット
[1-42件を表示]
(0.083秒)
種類
- インスタンスメソッド (36)
- 文書 (6)
クラス
- Pathname (24)
モジュール
- Kernel (12)
キーワード
-
NEWS for Ruby 2
. 7 . 0 (6) -
create
_ header (12)
検索結果
先頭4件
-
Pathname
# realpath -> Pathname (18120.0) -
余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。
...rmdir("/tmp/foo") rescue nil
File.unlink("/tmp/bar/foo") rescue nil
Dir.rmdir("/tmp/bar") rescue nil
Dir.mkdir("/tmp/foo")
Dir.mkdir("/tmp/bar")
File.symlink("../foo", "/tmp/bar/foo")
path = Pathname.new("bar/././//foo/../bar")
Dir.chdir("/tmp")
p path.realpath
# => ruby 1.8.0 (2003-10......-10) [i586-linux]
# #<Pathname:/tmp/bar>
//}
@see Pathname#realdirpath, File.realpath... -
Pathname
# realpath(basedir = nil) -> Pathname (18120.0) -
余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。
...rmdir("/tmp/foo") rescue nil
File.unlink("/tmp/bar/foo") rescue nil
Dir.rmdir("/tmp/bar") rescue nil
Dir.mkdir("/tmp/foo")
Dir.mkdir("/tmp/bar")
File.symlink("../foo", "/tmp/bar/foo")
path = Pathname.new("bar/././//foo/../bar")
Dir.chdir("/tmp")
p path.realpath
# => ruby 1.8.0 (2003-10......-10) [i586-linux]
# #<Pathname:/tmp/bar>
//}
@see Pathname#realdirpath, File.realpath... -
Kernel
# create _ header(header = "extconf . h") -> String (6112.0) -
Kernel#have_func, Kernel#have_header などの検査結果を元に、 ヘッダファイルを生成します。
...Kernel#have_func, Kernel#have_header などの検査結果を元に、
ヘッダファイルを生成します。
このメソッドは extconf.rb の最後で呼び出すようにしてください。
@param header ヘッダファイルの名前を指定します。
@return ヘッダファイ......します。
例
# extconf.rb
require 'mkmf'
have_func('realpath')
have_header('sys/utime.h')
create_header
create_makefile('foo')
上の extconf.rb は以下の extconf.h を生成します。
#ifndef EXTCONF_H
#define EXTCONF_H
#define HAVE_REALPATH 1
#define HAVE_SYS_UTIME... -
NEWS for Ruby 2
. 7 . 0 (462.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...リストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 2.6.0 以降の変更
=== 言語仕様の変更
==== パターンマッチ
* パターンマッチが実験的機能として導入されました。 14912
//emlist[][ruby]{
case [0, [1, 2, 3......]]
in [a, [b, *c]]
p a #=> 0
p b #=> 1
p c #=> [2, 3]
end
//}
//emlist[][ruby]{
case {a: 0, b: 1}
in {a: 0, x: 1}
:unreachable
in {a: 0, b: var}
p var #=> 1
end
//}
//emlist[][ruby]{
case -1
in 0 then :unreachable
in 1 then :unreachable
end #=> NoMatchingPatternError
//}
//emlist{
json......https://github.com/ruby/ruby/pull/2224
* 以下のように「--with-coroutine=」で別のコルーチン実装を選べるようになりました。
//emlist{
$ ./configure --with-coroutine=ucontext
$ ./configure --with-coroutine=copy
//}
* File
* File.realpathは多くのプラ...