Project

General

Profile

Actions

Defect #25563

closed

Remove is_binary_data? from String

Added by Dmitry Lisichkin over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Method is_binary_data? was removed from String class in ruby 1.9.2
https://apidock.com/ruby/v1_9_1_378/String/is_binary_data%3F

Then it was returned to String by redmine in 'rails 3.2' branch (r9475)

It cause problem with ruby-debug-ide gem:
https://github.com/ruby-debug/ruby-debug-ide/blob/ce3dbe0a76e11f34abf60740b7c88b23a1c3b5bf/lib/ruby-debug-ide/xml_printer.rb#L355
Almost all non-ASCII strings in debugger shown as [BinaryData]

I'll prefer remove that method at all but it used by SCM system.
It is a very old code (r5204) and I don't know about it is actual for now days.

But you can just rename that method to something different (see patch)


Files

is_binary_data.patch (1.9 KB) is_binary_data.patch Dmitry Lisichkin, 2017-04-10 10:21
issue-25563.diff (2.28 KB) issue-25563.diff Redmine::Scm::Adapters::ScmData.is_binary_data? Toshi MARUYAMA, 2017-05-11 09:16
issue-25563_2.diff (2.26 KB) issue-25563_2.diff Dmitry Lisichkin, 2017-05-11 21:44
Actions

Also available in: Atom PDF