diff options
| author | Xu Cheng | 2015-01-13 19:22:13 +0800 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-13 12:30:49 +0000 |
| commit | 8fe945d00f3b0717371c82387e99833d76350401 (patch) | |
| tree | bd07f9aeae082340c51cbc131134c06dc9e51a2c /Library/Formula | |
| parent | 30b4c10ab97b5dea468358c9b4ba3cb6b810ed8e (diff) | |
| download | homebrew-8fe945d00f3b0717371c82387e99833d76350401.tar.bz2 | |
gcc: drop quotes from heredoc marker and modernize
Closes #35818.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/gcc.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Library/Formula/gcc.rb b/Library/Formula/gcc.rb index 544a380dc..244b2aae6 100644 --- a/Library/Formula/gcc.rb +++ b/Library/Formula/gcc.rb @@ -1,5 +1,3 @@ -require "formula" - class Gcc < Formula def arch if Hardware::CPU.type == :intel @@ -166,7 +164,7 @@ class Gcc < Formula "#{lib}/gcc/#{version_suffix}/logging.properties", "#{lib}/gcc/#{version_suffix}/security/classpath.security", "#{lib}/gcc/#{version_suffix}/i386/logging.properties", - "#{lib}/gcc/#{version_suffix}/i386/security/classpath.security" + "#{lib}/gcc/#{version_suffix}/i386/security/classpath.security", ] config_files.each do |file| add_suffix file, version_suffix if File.exist? file @@ -174,7 +172,7 @@ class Gcc < Formula end end - def add_suffix file, suffix + def add_suffix(file, suffix) dir = File.dirname(file) ext = File.extname(file) base = File.basename(file, ext) @@ -203,11 +201,11 @@ class Gcc < Formula system "#{bin}/gcc-#{version_suffix}", "-o", "hello-c", "hello-c.c" assert_equal "Hello, world!\n", `./hello-c` - (testpath/"hello-cc.cc").write <<-'EOS'.undent + (testpath/"hello-cc.cc").write <<-EOS.undent #include <iostream> int main() { - std::cout << "Hello, world!\n"; + std::cout << "Hello, world!" << std::endl; return 0; } EOS |
