aboutsummaryrefslogtreecommitdiffstats
path: root/lib/csv.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csv.rb')
-rw-r--r--lib/csv.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/csv.rb b/lib/csv.rb
index 50aba3d91e..ce05164c75 100644
--- a/lib/csv.rb
+++ b/lib/csv.rb
@@ -2319,6 +2319,10 @@ class CSV
private
+ #
+ # Returns the encoding of the internal IO object or the +default+ if the
+ # encoding cannot be determined.
+ #
def raw_encoding(default = Encoding::ASCII_8BIT)
if @io.respond_to? :internal_encoding
@io.internal_encoding || @io.external_encoding