File tree Expand file tree Collapse file tree 3 files changed +8
-27
lines changed
Expand file tree Collapse file tree 3 files changed +8
-27
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,8 @@ Changes:
103103 * Redefine ` String#lchomp ` / ` #lchomp! ` as aliases for ` delete_prefix ` / ` delete_prefix! ` .
104104 * Rename ` Time#trunc ` to ` Time#floor_to ` (parallels ` Time#round_to ` ; avoids confusion
105105 with Ruby's ` Time#floor ` which takes sub-second digit precision). ` trunc ` deprecated.
106+ * Deprecate ` File.null ` (use ` File::NULL ` constant, Ruby 1.9.3+).
107+ * Deprecate ` File.read_binary ` (use ` File.binread ` , Ruby 1.9.3+).
106108 * Fix dead requires for removed ` kernel/singleton_class ` in Proc and Kernel.
107109 * Remove misplaced ` applique/file_helpers ` from core (test infrastructure).
108110 * Drop unused ` test_files ` directive from gemspec. (PR #301 )
Original file line number Diff line number Diff line change 11class File
22
3- # Platform dependent null device.
4- #
5- # CREDIT: Daniel Burger
6-
3+ # @deprecated Use File::NULL constant instead (built-in since Ruby 1.9.3).
74 def self . null
8- case RUBY_PLATFORM
9- when /mswin/i
10- 'NUL'
11- when /amiga/i
12- 'NIL:'
13- when /openvms/i
14- 'NL:'
15- else
16- '/dev/null'
17- end
5+ warn "File.null is deprecated. Use File::NULL instead." , uplevel : 1
6+ File ::NULL
187 end
198
209end
21-
Original file line number Diff line number Diff line change 11class File
22
3- # Read in a file as binary data.
4- #
5- # Assuming we had a binary file 'binary.dat'.
6- #
7- # File.read_binary('binary.dat')
8- #
9- # CREDIT: George Moschovitis
10-
3+ # @deprecated Use File.binread instead (built-in since Ruby 1.9.3).
114 def self . read_binary ( fname )
12- open ( fname , 'rb' ) do |f |
13- return f . read
14- end
5+ warn "File.read_binary is deprecated. Use File.binread instead." , uplevel : 1
6+ binread ( fname )
157 end
168
179end
18-
You can’t perform that action at this time.
0 commit comments