Skip to content

Commit ca48cc4

Browse files
committed
* lib/net/ftp.rb (size, modify, create, type, unique, perm, lang,
media_type, charset): new methods to return standard facts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent ddc58a8 commit ca48cc4

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Sun Sep 13 09:38:51 2015 Shugo Maeda <shugo@ruby-lang.org>
2+
3+
* lib/net/ftp.rb (size, modify, create, type, unique, perm, lang,
4+
media_type, charset): new methods to return standard facts.
5+
16
Sat Sep 12 19:43:49 2015 Koichi Sasada <ko1@atdot.net>
27

38
* vm_insnhelper.c (vm_call_iseq_setup_normal): do not clear local

lib/net/ftp.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,14 @@ def initialize(facts, pathname)
781781
@pathname = pathname
782782
end
783783

784+
standard_facts = %w(size modify create type unique perm
785+
lang media-type charset)
786+
standard_facts.each do |factname|
787+
define_method factname.gsub(/-/, "_") do
788+
facts[factname]
789+
end
790+
end
791+
784792
#
785793
# Returns +true+ if the entry is a file (i.e., the value of the type
786794
# fact is file).

0 commit comments

Comments
 (0)