We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5289373 commit 34da65aCopy full SHA for 34da65a
syslog.gemspec
@@ -1,12 +1,6 @@
1
-
2
-source_version = ["", "ext/syslog/"].find do |dir|
3
- begin
4
- break File.open(File.join(__dir__, "#{dir}syslog.c")) {|f|
5
- f.gets("\n#define SYSLOG_VERSION ")
6
- f.gets[/\s*"(.+)"/, 1]
7
- }
8
- rescue Errno::ENOENT
9
- end
+source_version = %w[. ext/syslog].find do |dir|
+ break $1 if File.foreach(File.join(__dir__, dir, "syslog.c")).any?(/^#define\s+SYSLOG_VERSION\s+"(.+)"/)
+rescue Errno::ENOENT
10
end
11
12
Gem::Specification.new do |spec|
0 commit comments