Skip to content
This repository

Fix Etc rubyspecs #672

Merged
merged 1 commit into from 12 months ago

2 participants

Alex Tambellini Charles Oliver Nutter
Alex Tambellini
Collaborator

No description provided.

Charles Oliver Nutter headius merged commit 2144a2f into from April 28, 2013
Charles Oliver Nutter headius closed this April 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Apr 28, 2013
Alex Tambellini Fix Etc rubyspecs 735c236
This page is out of date. Refresh to see the latest.
1  spec/tags/1.8/ruby/library/etc/group_tags.txt
... ...
@@ -1 +0,0 @@
1  
-fails:Etc.group raises a RuntimeError for parallel iteration
2  spec/tags/1.9/ruby/library/etc/getgrgid_tags.txt
... ...
@@ -1,2 +0,0 @@
1  
-fails:Etc.getgrgid returns a Etc::Group struct instance for the given user
2  
-fails:Etc.getgrgid returns the Etc::Group for a given gid if it exists
1  spec/tags/1.9/ruby/library/etc/getgrnam_tags.txt
... ...
@@ -1 +0,0 @@
1  
-fails:Etc.getgrnam returns a Etc::Group struct instance for the given group
1  spec/tags/1.9/ruby/library/etc/getpwnam_tags.txt
... ...
@@ -1 +0,0 @@
1  
-fails:Etc.getpwnam returns a Etc::Passwd struct instance for the given user
1  spec/tags/1.9/ruby/library/etc/getpwuid_tags.txt
... ...
@@ -1 +0,0 @@
1  
-fails:Etc.getpwuid returns a Etc::Passwd struct instance for the given user
1  spec/tags/1.9/ruby/library/etc/group_tags.txt
... ...
@@ -1 +0,0 @@
1  
-fails:Etc.group raises a RuntimeError for parallel iteration
6  src/org/jruby/ext/etc/RubyEtc.java
@@ -53,6 +53,9 @@ private static void definePasswdStruct(Ruby runtime) {
53 53
         };
54 54
         
55 55
         runtime.setPasswdStruct(RubyStruct.newInstance(runtime.getStructClass(), args, Block.NULL_BLOCK));
  56
+        if (runtime.is1_9()) {
  57
+            runtime.getEtc().defineConstant("Passwd", runtime.getPasswdStruct());
  58
+        }
56 59
     }
57 60
 
58 61
     private static void defineGroupStruct(Ruby runtime) {
@@ -65,6 +68,9 @@ private static void defineGroupStruct(Ruby runtime) {
65 68
         };
66 69
         
67 70
         runtime.setGroupStruct(RubyStruct.newInstance(runtime.getStructClass(), args, Block.NULL_BLOCK));
  71
+        if (runtime.is1_9()) {
  72
+            runtime.getEtc().defineConstant("Group", runtime.getGroupStruct());
  73
+        }
68 74
     }
69 75
     
70 76
     private static IRubyObject setupPasswd(Ruby runtime, Passwd passwd) {
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.