るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.010秒)

別のキーワード

  1. group point_conversion_form
  2. group point_conversion_form=
  3. openssl point_conversion_form
  4. openssl point_conversion_form=
  5. scanf conversion

種類

ライブラリ

キーワード

検索結果

NKF (38132.0)

nkf(Network Kanji code conversion Filter, https://osdn.net/projects/nkf/) を Ruby から使うためのモジュールです。

...nkf(Network Kanji code conversion Filter, https://osdn.net/projects/nkf/) を
Ruby から使うためのモジュールです。

=== 使い方

以下は、漢字コード変換コマンドの例です。

//emlist[例][ruby]{
#!/usr/local/bin/ruby

require 'nkf'

opt = ''
opt = ARGV.shift if ARGV[...
... NKF.nkf(opt, line)
end
//}

以下は、漢字コード判別コマンドの例です。

//emlist[例][ruby]{
#!/usr/local/bin/ruby

require 'nkf'

CODES = {
NKF
::JIS => "JIS",
NKF
::EUC => "EUC",
NKF
::SJIS => "SJIS",
NKF
::UTF8 => "UTF8",
NKF
::BINARY => "BINARY",
NKF
...
...::ASCII => "ASCII",
NKF
::UNKNOWN => "UNKNOWN",
}

while file = ARGV.shift
str = open(file) {|io| io.gets(nil) }

printf "%-10s ", file
if str.nil?
puts "EMPTY"
else
puts CODES.fetch(NKF.guess(str))
end
end
//}

=== オプション文字列

-b 入力がバッファリン...

ruby 1.6 feature (42.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

.../Integer>)) と同じ規則を
使用するようになりました。

p sprintf("%d", nil)

=> -:1:in `sprintf': no implicit conversion from nil (TypeError)
from -:1
ruby 1.6.7 (2002-03-01) [i586-linux]

=> ruby 1.6.7 (2002-07-30) [i586-linux]...
...e
true
=> ruby 1.6.4 (2001-08-06) [i586-linux]
true
true

: ((<NKF|nkf>)).nkf

正しく汚染が伝搬していませんでした。((<ruby-dev:13754>))

require 'nkf'
p NKF.nkf("-j", "a".taint).tainted?

=> ruby 1.6.4 (2001-06-04) [i586-linux]
false...
...h.each { |k, v|
if (k == 10)
h.delete(10)
h2.replace(h) # => Abort core dumped
end
}

: $SAFE / ((<File>)).unlink

F
ile.unlink は引数が汚染されてなくても $SAFE >= 2 の環境下では
禁止するようになりました。((<ruby-dev:13426>))...

ruby 1.8.4 feature (18.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...k/radiobutton.rb, ext/tk/lib/tk/scale.rb,
# ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tk/text.rb,
# ext/tk/lib/tk/toplevel.rb: improve conversion of option values.
#
# * ext/tk/lib/tkextlib/*: ditto.
#

ウィジェットオブジェクトの属性参照をした場合に属性...
...@ruby-lang.org>
#
# * lib/rexml/encoding.rb (encoding=): give priority to particular
# conversion to iconv. [ruby-core:06520]

日本語のエンコーディング変換にiconvよりもnkfを優先して使用するようにし
ました。((<ruby-list:41325>)), ((<ruby-core:...