davemyron (Dave Myron)
- Login: davemyron
- Registered on: 09/16/2017
- Last sign in: 05/13/2021
Issues
| open | closed | Total | |
|---|---|---|---|
| Assigned issues | 0 | 0 | 0 |
| Reported issues | 0 | 2 | 2 |
Activity
10/04/2017
-
05:52 PM Ruby Bug #13965: Surprising behavior when using Tempfile.open
- Could a small documentation blurb alleviate future headaches for other users?
If the docs had said something like "Due to buffering, the contents of a file may be incomplete until flushed" I would not have been (so) surprised.
10/03/2017
-
12:17 AM Ruby Bug #13965: Surprising behavior when using Tempfile.open
- To workaround the unexpected behavior, either use `IO#sync = true` or `IO#flush` after writing to the file.
-
12:12 AM Ruby Bug #13965: Surprising behavior when using Tempfile.open
- This appears to be the behavior of `File.open` + block, as well:
```
>> File.open("/tmp/test.txt","w+"){|f| (1..10000).each { |i| f.puts i }; `tail -n1 #{f.path}` }
=> "8416"
``` -
12:03 AM Ruby Bug #13965 (Rejected): Surprising behavior when using Tempfile.open
- I was trying to write the contents of an array to a Tempfile using the #open() + block syntax: Tempfile.open { |f| my_array.each { |item| f.puts item }}
However, I was finding that only *most* of the items were being written to the fi...
09/16/2017
-
04:14 AM Ruby Bug #13908 (Closed): Result of Pathname#dirname / File.dirname handling of paths with trailing File::SEPARATOR is surprising
- Given `File.dirname("/some/folder/")` the result of `/some` is very surprising because the path is "obviously" a directory without a file specified. (I got bit by this today… yes, I needed more tests)
My expectation was that it would ...