etc 1.4.4 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog +4 -4
- data/LICENSE.txt +3 -3
- data/ext/etc/etc.c +14 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 498daaac5148043cbab0229b5d3b61e9a21686221526d500e9a9e1230a87ee54
|
4
|
+
data.tar.gz: 7795ea2122ceb03395ad234b35786bb6730689fbde1c7d1eb371e13a2c33e443
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5aaafa9514d0d6655cc50214ed8e6429618b0ab1ae400db59d31e454258e0e205d51b32c67b2bc9809c49f2fe34a0b79907c61458427f640529830753bebbec
|
7
|
+
data.tar.gz: 6ffe4ac0df5f414a4f7e6ca3597267eec3487230e5b646a316ce22d1688e7b4b0490a9e4dee39f72cad16263e55bca6342c4fe40e32cb724b904d3d0b4e332fa
|
data/ChangeLog
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
-*- coding: utf-8 -*-
|
2
2
|
|
3
|
-
commit
|
3
|
+
commit 5019f4314a899cd231c51e1e1225fe035adf4aac
|
4
4
|
Author: Hiroshi SHIBATA <hsbt@ruby-lang.org>
|
5
|
-
AuthorDate: 2024-
|
5
|
+
AuthorDate: 2024-12-03 13:53:43 +0900
|
6
6
|
Commit: Hiroshi SHIBATA <hsbt@ruby-lang.org>
|
7
|
-
CommitDate: 2024-
|
7
|
+
CommitDate: 2024-12-03 13:53:43 +0900
|
8
8
|
|
9
|
-
Bump up
|
9
|
+
Bump up 1.4.5
|
data/LICENSE.txt
CHANGED
@@ -4,10 +4,10 @@ Redistribution and use in source and binary forms, with or without
|
|
4
4
|
modification, are permitted provided that the following conditions
|
5
5
|
are met:
|
6
6
|
1. Redistributions of source code must retain the above copyright
|
7
|
-
notice, this list of conditions and the following disclaimer.
|
7
|
+
notice, this list of conditions and the following disclaimer.
|
8
8
|
2. Redistributions in binary form must reproduce the above copyright
|
9
|
-
notice, this list of conditions and the following disclaimer in the
|
10
|
-
documentation and/or other materials provided with the distribution.
|
9
|
+
notice, this list of conditions and the following disclaimer in the
|
10
|
+
documentation and/or other materials provided with the distribution.
|
11
11
|
|
12
12
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
13
13
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
data/ext/etc/etc.c
CHANGED
@@ -56,7 +56,9 @@ static VALUE sGroup;
|
|
56
56
|
#endif
|
57
57
|
RUBY_EXTERN char *getlogin(void);
|
58
58
|
|
59
|
-
#define RUBY_ETC_VERSION "1.4.
|
59
|
+
#define RUBY_ETC_VERSION "1.4.5"
|
60
|
+
|
61
|
+
#define SYMBOL_LIT(str) ID2SYM(rb_intern_const(str ""))
|
60
62
|
|
61
63
|
#ifdef HAVE_RB_DEPRECATE_CONSTANT
|
62
64
|
void rb_deprecate_constant(VALUE mod, const char *name);
|
@@ -697,7 +699,7 @@ rbconfig(void)
|
|
697
699
|
{
|
698
700
|
VALUE config;
|
699
701
|
rb_require("rbconfig");
|
700
|
-
config = rb_const_get(rb_path2class("RbConfig"),
|
702
|
+
config = rb_const_get(rb_path2class("RbConfig"), rb_intern_const("CONFIG"));
|
701
703
|
Check_Type(config, T_HASH);
|
702
704
|
return config;
|
703
705
|
}
|
@@ -823,12 +825,12 @@ etc_uname(VALUE obj)
|
|
823
825
|
sysname = "Windows";
|
824
826
|
break;
|
825
827
|
}
|
826
|
-
rb_hash_aset(result,
|
828
|
+
rb_hash_aset(result, SYMBOL_LIT("sysname"), rb_str_new_cstr(sysname));
|
827
829
|
release = rb_sprintf("%lu.%lu.%lu", v.dwMajorVersion, v.dwMinorVersion, v.dwBuildNumber);
|
828
|
-
rb_hash_aset(result,
|
830
|
+
rb_hash_aset(result, SYMBOL_LIT("release"), release);
|
829
831
|
version = rb_sprintf("%s Version %"PRIsVALUE": %"PRIsVALUE, sysname, release,
|
830
832
|
rb_w32_conv_from_wchar(v.szCSDVersion, rb_utf8_encoding()));
|
831
|
-
rb_hash_aset(result,
|
833
|
+
rb_hash_aset(result, SYMBOL_LIT("version"), version);
|
832
834
|
|
833
835
|
# if defined _MSC_VER && _MSC_VER < 1300
|
834
836
|
# define GET_COMPUTER_NAME(ptr, plen) GetComputerNameW(ptr, plen)
|
@@ -842,7 +844,7 @@ etc_uname(VALUE obj)
|
|
842
844
|
}
|
843
845
|
ALLOCV_END(vbuf);
|
844
846
|
if (NIL_P(nodename)) nodename = rb_str_new(0, 0);
|
845
|
-
rb_hash_aset(result,
|
847
|
+
rb_hash_aset(result, SYMBOL_LIT("nodename"), nodename);
|
846
848
|
|
847
849
|
# ifndef PROCESSOR_ARCHITECTURE_AMD64
|
848
850
|
# define PROCESSOR_ARCHITECTURE_AMD64 9
|
@@ -866,7 +868,7 @@ etc_uname(VALUE obj)
|
|
866
868
|
break;
|
867
869
|
}
|
868
870
|
|
869
|
-
rb_hash_aset(result,
|
871
|
+
rb_hash_aset(result, SYMBOL_LIT("machine"), rb_str_new_cstr(mach));
|
870
872
|
#else
|
871
873
|
struct utsname u;
|
872
874
|
int ret;
|
@@ -877,11 +879,11 @@ etc_uname(VALUE obj)
|
|
877
879
|
rb_sys_fail("uname");
|
878
880
|
|
879
881
|
result = rb_hash_new();
|
880
|
-
rb_hash_aset(result,
|
881
|
-
rb_hash_aset(result,
|
882
|
-
rb_hash_aset(result,
|
883
|
-
rb_hash_aset(result,
|
884
|
-
rb_hash_aset(result,
|
882
|
+
rb_hash_aset(result, SYMBOL_LIT("sysname"), rb_str_new_cstr(u.sysname));
|
883
|
+
rb_hash_aset(result, SYMBOL_LIT("nodename"), rb_str_new_cstr(u.nodename));
|
884
|
+
rb_hash_aset(result, SYMBOL_LIT("release"), rb_str_new_cstr(u.release));
|
885
|
+
rb_hash_aset(result, SYMBOL_LIT("version"), rb_str_new_cstr(u.version));
|
886
|
+
rb_hash_aset(result, SYMBOL_LIT("machine"), rb_str_new_cstr(u.machine));
|
885
887
|
#endif
|
886
888
|
|
887
889
|
return result;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: etc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yukihiro Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Provides access to information typically stored in UNIX /etc directory.
|
14
14
|
email:
|