るりまサーチ

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

別のキーワード

  1. rss date=
  2. rss date
  3. date iso8601
  4. date rfc3339
  5. date jisx0301

検索結果

<< 1 2 > >>

Date#===(other) -> bool (29200.0)

同じ日なら真を返します。

同じ日なら真を返します。

@param other 日付オブジェクト

Exception#==(other) -> bool (18146.0)

自身と指定された other のクラスが同じであり、 message と backtrace が == メソッドで比較して 等しい場合に true を返します。そうでない場合に false を返します。

...自身と指定された other のクラスが同じであり、
message と backtrace が == メソッドで比較して
等しい場合に true を返します。そうでない場合に false を返します。

@param other 自身と比較したいオブジェクトを指定します。...
...合は
Exception#exception を実行して変換を試みます。

//emlist[例][ruby]{
require "date"
def check_long_month(month)
return if Date.new(2000, month, -1).day == 31
raise "#{month} is not long month"
end

def get_exception
return begin
yield
rescue => e
e...
...is not long month", "2 is not long month", "4 is not long month"]

# class, message, backtrace が同一のため true になる
p results[0] == results[1] # => true

# class, backtrace が同一だが、message がことなるため false になる
p results[0] == results[2] # => false
//}...

Range#===(obj) -> bool (12242.0)

始端と終端の中に obj があるとき、true を返します。 そうでないとき、false を返します。

...き、true を返します。
そうでないとき、false を返します。

Range#=== は主に case 式での比較に用いられます。

//emlist[例][ruby]{
p (0...50) === 79 #=> false
p (60...80) === 79 #=> true

case 79
when 0...60 then puts "low"
when 60...80 then puts "medium" #...
...=== は、Range#cover? のように Range オブジェクトを引数にはとる設計はありません。

//emlist[例][ruby]{
require 'date'
p (Date.today - 100...Date.today + 100).include?(DateTime.now) #=> false
p (Date.today - 100...Date.today + 100).cover?(DateTime.now) #=> true
p (Date...
....today - 100...Date.today + 100) === DateTime.now #=> true
# 2.5 以前は、=== は、include? と同じく比較できず false を返していました。
//}


@see d:spec/control#case
@see Range#include?, Range#cover?...
....today - 100...Date.today + 100) === DateTime.now #=> true
# 2.5 以前は、=== は、include? と同じく比較できず false を返していました。
//}

2.7 以降の === は、文字列も Range#cover? と同様の処理をするようになりました。

//emlist[例][ruby]{
p (...

rss (210.0)

RSS を扱うためのライブラリです。

...S を扱うためのライブラリです。

==
= 参考

* RSS 0.91 http://backend.userland.com/rss091
* RSS 1.0 http://purl.org/rss/1.0/spec
* RSS 2.0 http://www.rssboard.org/rss-specification
* Atom 1.0 https://www.ietf.org/rfc/rfc4287.txt

==
= 注意

RSS ParserはRSS 0.9x/1.0/2.0, Ato...
.../1.0/modules/image/
をサポートしています。
ただし,Content モジュールは content:encoded しかサポートしていません.

==
= パース

RSS をパースしたい場合は RSS::Parser クラスを使います。
RSS::Parser.parse は String の RSSを パースします(...
...html"
item.title = "Sample Article"
item.date = Time.parse("2004/11/1 10:10")
end
end

サンプル中の

item.date = ...



item.dc_date = ...

でも構いません.#dc_date=は#date=の単なる別名で
す.

==
=== さらにエントリを追加

さらに,

* h...

NEWS for Ruby 3.1.0 (90.0)

NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストはリンク先を参照してください。

==
言語仕様の変更

* ブロックが他のメソッドに渡されるだけの場合は、ブロックの引数を無名にできるように...
...ことに注意してください。 17398

==
コマンドラインオプション

* --disable-gems は"デバッグ専用"として明示的に宣言されました。デバッグ専用以外のコードでは使用しないでください。 17684

==
組み込みクラスの更新(注目す...
...した。

==
標準添付ライブラリの更新(機能追加とバグ修正を除く)

* 以下のdefault gemsが更新されました。
* RubyGems 3.3.3
* base64 0.1.1
* benchmark 0.2.0
* bigdecimal 3.1.1
* bundler 2.3.3
* cgi 0.3.1
* csv 3.2.2
* date 3.2.2...

絞り込み条件を変える

ruby 1.6 feature (84.0)

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

...(<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。

==
1.6.8 (2002-12-24) -> stable-snapshot

: 2003-01-22: errno

EAGAIN と EWOULDBLOCK が同じ値のシステムで、EWOULDBLOCK がなくなっ...
...ialized constant EWOULDBLOCK at Errno (NameError)

=> ruby 1.6.8 (2003-02-13) [i586-linux]
Errno::EAGAIN
Errno::EAGAIN

==
1.6.7 (2002-03-01) -> 1.6.8 (2002-12-24)

: 2002-10-02: Thread (cygwin)

Cygwin で、Thread の切替えが行われないことがありまし...
...ruby '-*' -v
=> ruby 1.6.7 (2002-03-01) [i586-linux]

=> ruby: invalid option -* (-h will show valid options)

: 2002-05-22 parsedate

バージョンアップ((<ruby-dev:17171>))

: 2002-05-22 -T オプション

ruby のコマンドラインオプション -T の後に空白...

NEWS for Ruby 3.0.0 (72.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストはリンク先を参照してください。

==
言語仕様の変更

* Keyword arguments are now separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2....
...a warning.

==
Command line options

==
= `--help` option

When the environment variable `RUBY_PAGER` or `PAGER` is present and has
a non-empty value, and the standard input and output are tty, the `--help`
option shows the help message via the pager designated by the value.
16754

==
= `--backtrac...
...e-limit` option

The `--backtrace-limit` option limits the maximum length of a backtrace.
8661

==
Core classes updates

Outstanding ones only.

* Array
* The following methods now return Array instances instead of subclass instances when called on subclass instances: 6087
* Array#drop...

ruby 1.9 feature (54.0)

ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。

...ムの追加

==
1.9.0

==
= 2006-09-16

: Struct#inspect

==
= 2006-09-14

: digest.rb
: Digest::Base.file

==
= 2006-09-13

: Hash#compare_by_identity
: Hash#compare_by_identity?
: Hash#identical
: Hash#identical?

==
= 2006-09-12

: Hash#compare_by_identity
: Hash#compare_by_identity?

==
= 2006-09-11...
...: Hash#identical
: Hash#identical?

==
= 2006-08-31

: Array#shuffle
: Array#shuffle!

追加

==
= 2006-07-26

: __send
: __send!

追加

: invoke_method
: invoke_functional_method

削除

==
= 2006-07-21

: Module#attr

オプショナル引数の assignable がなくなり、attr_reader...
...+in+Ruby+1.9+update+4>))

==
= 2006-05-22

: accept

((<ruby-core:7917>))

==
= 2006-03-21

: MatchData#[] [compat]

名前による参照
((<ruby-dev:28446>))

==
= 2006-03-03

: FileUtils.cp_r [lib] [compat]

remove_destination オプションの追加
((<ruby-dev:28417>))

==
= 2006-02-15...

NEWS for Ruby 2.7.0 (42.0)

NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...た全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

==
2.6.0 以降の変更

==
= 言語仕様の変更

==
== パターンマッチ

* パターンマッチが実験的機能として導入されました。 14912

//emlist[][rub...
...ことに注意してください。

* パターンマッチに対する警告は「-W:no-experimental」オプションで抑制できます。

==
== 3.0 に向けてのキーワード引数の仕様変更

* キーワード引数と位置引数の自動変換は自動変換が非推奨とな...
...デフォルト実装から
lazyになりました。7877

//emlist[Enumerator.produce][ruby]{
require "date"
date
s = Enumerator.produce(Date.today, &:succ) #=> infinite sequence of dates
date
s.detect(&:tuesday?) #=> next Tuesday
//}
//emlist[Enumerator::Lazy#eager][ruby]{
a = %w(foo bar baz)
e = a...

tsort (30.0)

tsort はトポロジカルソートと強連結成分に関するモジュールを提供します。

...tsort はトポロジカルソートと強連結成分に関するモジュールを提供します。

==
= Example

//emlist[][ruby]{
require 'tsort'

class Hash
include TSort
alias tsort_each_node each_key
def tsort_each_child(node, &block)
fetch(node).each(&block)
end
end

{1=>[2, 3],...
...2=>[3], 3=>[], 4=>[]}.tsort
#=> [3, 2, 1, 4]

{1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}.strongly_connected_components
#=> [[4], [2, 3], [1]]
//}

==
= より現実的な例

非常に単純な `make' に似たツールは以下のように実装できます。

//emlist[][ruby]{
require 'tsort'

class Make...
...&& inputs_time.to_i == Time.now.to_i
block.call
end
end
}
end

def tsort_each_child(node, &block)
@dep[node].each(&block)
end
include TSort
end

def command(arg)
print arg, "\n"
system arg
end

m = Make.new
m.rule(%w[t1]) { command 'date > t1' }
m.rule(%w[...

絞り込み条件を変える

yaml (30.0)

構造化されたデータを表現するフォーマットであるYAML (YAML Ain't Markup Language) を扱うためのライブラリです。

...dump(data)

str_l = <<~YAML_EOT
---
- Taro san
- Jiro san
- Saburo san
YAML_EOT

p str_r == str_l # => true
//}

//emlist[例2: 構造化されたハッシュ][ruby]{
require 'yaml'
require 'date'

str_l = <<~YAML_EOT
Tanaka Taro: {age: 35, birthday: 1970-01-01}
Suzuki Suneo: {
age:...
...1992-12-21
}
YAML_EOT

str_r = {}
str_r["Tanaka Taro"] = {
"age" => 35,
"birthday" => Date.new(1970, 1, 1)
}
str_r["Suzuki Suneo"] = {
"age" => 13,
"birthday" => Date.new(1992, 12, 21)
}

p str_r == YAML.load(str_l) # => true
//}

//emlist[例3: 構造化されたログ][ruby]{
require '...
...トラクトを修正した。
#
//}

==
= バックエンドの選択

yaml ライブラリでは、以下のライブラリをバックエンドとして使用します。

* psych ライブラリ: YAML バージョン 1.1 を扱う事ができます。


==
= タグの指定

!ruby/sym :foo など...
<< 1 2 > >>