binaryen 1.1.6.12 → 1.1.6.13
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/lib/binaryen/command.rb +10 -6
- data/lib/binaryen/version.rb +1 -1
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: a9fa0d4b995d4acbe38a55e4e8ab15f530185f94bce36b8bc6623488d4485f2f
         | 
| 4 | 
            +
              data.tar.gz: a5d2c80e011ccc5c982d64128e5104a0fe426b34bd7197fffa2bcf3c3a0f0261
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 2b850bd1469ef829c090aa5dabbbab19a06519bfaff0b180d337ea2f3704f31cbcdb2b4c05e342878c6e6165d45e419da837d1de597c0bd66b00e9999981e5d4
         | 
| 7 | 
            +
              data.tar.gz: 0f940511241644486418674f99dbc0cadff435200ed5c0d5433a61ba8bff02560d55cf459d2d6ef3084143ccb3984e0443f8a064f68c9c71c42159f53f6936bd
         | 
    
        data/lib/binaryen/command.rb
    CHANGED
    
    | @@ -34,21 +34,25 @@ module Binaryen | |
| 34 34 | 
             
                def spawn_command(*args, stderr: nil, stdin: nil)
         | 
| 35 35 | 
             
                  pid = nil
         | 
| 36 36 |  | 
| 37 | 
            -
                   | 
| 38 | 
            -
                    in_read.binmode
         | 
| 37 | 
            +
                  Tempfile.create("binaryen-input") do |in_write|
         | 
| 39 38 | 
             
                    in_write.binmode
         | 
| 40 | 
            -
                    in_write.sync = true
         | 
| 41 39 | 
             
                    in_write.write(stdin) if stdin
         | 
| 40 | 
            +
                    in_write.close
         | 
| 42 41 |  | 
| 43 42 | 
             
                    Tempfile.create("binaryen-output") do |tmpfile|
         | 
| 44 43 | 
             
                      tmpfile.close
         | 
| 45 44 |  | 
| 46 45 | 
             
                      File.open(File::NULL, "w") do |devnull|
         | 
| 47 46 | 
             
                        IO.pipe do |err_read, err_write|
         | 
| 48 | 
            -
                          pid = POSIX::Spawn.pspawn( | 
| 49 | 
            -
             | 
| 47 | 
            +
                          pid = POSIX::Spawn.pspawn(
         | 
| 48 | 
            +
                            *args,
         | 
| 49 | 
            +
                            "--output=#{tmpfile.path}",
         | 
| 50 | 
            +
                            in_write.path,
         | 
| 51 | 
            +
                            in: devnull,
         | 
| 52 | 
            +
                            out: devnull,
         | 
| 53 | 
            +
                            err: err_write,
         | 
| 54 | 
            +
                          )
         | 
| 50 55 | 
             
                          err_write.close
         | 
| 51 | 
            -
                          in_write.close
         | 
| 52 56 |  | 
| 53 57 | 
             
                          _, status = Process.waitpid2(pid)
         | 
| 54 58 | 
             
                          pid = nil
         | 
    
        data/lib/binaryen/version.rb
    CHANGED