Project

General

Profile

Actions

Bug #8511

closed

gsub("\\","\\\\") works incorrect

Added by galnaktar (Oleg K) over 11 years ago. Updated over 11 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0p195 (2013-05-14) [i386-mingw32]
[ruby-core:55425]

Description

DL is deprecated, please use Fiddle
irb(main):001:0> a = "\"
=> "\"
irb(main):002:0> a.gsub("\", "\\")
=> "\"
irb(main):003:0> a.gsub("\", ".")
=> "."
irb(main):004:0> a.gsub(".", "\\")
=> "\"
irb(main):005:0> a = "\"
=> "\"
irb(main):006:0> a.gsub("..", "\\")
=> "\"
irb(main):007:0> a.gsub("..", "\\")
=> "\"
irb(main):008:0> "\".gsub("..", "\\")
=> "\"
irb(main):009:0> "\".gsub(/./, "\\")
=> "\"
irb(main):010:0> "..".gsub("..", "\\")
=> "\"
irb(main):011:0> "...".gsub("...", "\\\")
=> "\\"
irb(main):012:0>

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0