[前][次][番号順一覧][スレッド一覧]

ruby-changes:35153

From: hsbt <ko1@a...>
Date: Thu, 21 Aug 2014 13:23:58 +0900 (JST)
Subject: [ruby-changes:35153] hsbt:r47235 (trunk): * lib/drb/acl.rb: split executable code into sample directory.

hsbt	2014-08-21 13:23:43 +0900 (Thu, 21 Aug 2014)

  New Revision: 47235

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47235

  Log:
    * lib/drb/acl.rb: split executable code into sample directory.
    * sample/drb/acl.rb: ditto.

  Added files:
    trunk/sample/drb/acl.rb
  Modified files:
    trunk/ChangeLog
    trunk/lib/drb/acl.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47234)
+++ ChangeLog	(revision 47235)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Aug 21 13:21:45 2014  SHIBATA Hiroshi  <shibata.hiroshi@g...>
+
+	* lib/drb/acl.rb: split executable code into sample directory.
+	* sample/drb/acl.rb: ditto.
+
 Thu Aug 21 12:55:35 2014  SHIBATA Hiroshi  <shibata.hiroshi@g...>
 
 	* .gitignore: ignored temporary file for Changelog.
Index: sample/drb/acl.rb
===================================================================
--- sample/drb/acl.rb	(revision 0)
+++ sample/drb/acl.rb	(revision 47235)
@@ -0,0 +1,15 @@ https://github.com/ruby/ruby/blob/trunk/sample/drb/acl.rb#L1
+require 'drb/acl'
+
+list = %w(deny all
+          allow 192.168.1.1
+          allow ::ffff:192.168.1.2
+          allow 192.168.1.3
+)
+
+addr = ["AF_INET", 10, "lc630", "192.168.1.3"]
+
+acl = ACL.new
+p acl.allow_addr?(addr)
+
+acl = ACL.new(list, ACL::DENY_ALLOW)
+p acl.allow_addr?(addr)
Index: lib/drb/acl.rb
===================================================================
--- lib/drb/acl.rb	(revision 47234)
+++ lib/drb/acl.rb	(revision 47235)
@@ -230,21 +230,3 @@ class ACL https://github.com/ruby/ruby/blob/trunk/lib/drb/acl.rb#L230
   end
 
 end
-
-if __FILE__ == $0
-  # example
-  list = %w(deny all
-            allow 192.168.1.1
-            allow ::ffff:192.168.1.2
-            allow 192.168.1.3
-            )
-
-  addr = ["AF_INET", 10, "lc630", "192.168.1.3"]
-
-  acl = ACL.new
-  p acl.allow_addr?(addr)
-
-  acl = ACL.new(list, ACL::DENY_ALLOW)
-  p acl.allow_addr?(addr)
-end
-

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]