Git Product home page Git Product logo

turkish_support's Issues

comparison of Array with Array failed (ArgumentError)

önce hata çıktısı

.rvm/gems/ruby-2.3.3@rails5_1_1/gems/turkish_support-1.0.3/lib/turkish_support/array_methods.rb:4:in sort_by': comparison of Array with Array failed (ArgumentError)`

.rvm/gems/ruby-2.3.3@rails5_1_1/gems/turkish_support-1.0.3/lib/turkish_support/array_methods.rb:4:in sort'
from ./sort.rb:13:in <main>'

bu hatayı içinde türkçe karakter olmayan dizinlerde de alıyorum

# şu sorunsuz çalışıyor
['isim soyisim', 'isim soyisim'].sort

# şu ise çalışmıyor
['isim soyisim', 'isim1 soyisim'].sort

# aynı şekilde bu da çalışmıyor
['isim1 soyisim', 'isim soyisim'].sort

sorun sadece boşluk olmasında da değil

# bu çalışıyor
['isim1soyisim', 'isim2soyisim'].sort

# bunlar ise çalışmıyor
['isim1soyisim', 'isim21soyisim'].sort
['1soyisim', '12soyisim'].sort
['a', '3s'].sort
['1a', 'b'].sort
['a', '2 b'].sort

# her kelimeden sonra birer boşluk var
['a ' , 'ab '].sort

upcase problem

Hey,
There is a problem with "i" character when upcasing it.

str = "içel"
str.upcase
str        #=> "IÇEL"

It should be "İÇEL".

iterasyonlarda shorthand notasyonunda hatali sonuc (&:)

Selam,
Mesela row.map {|elem| elem.capitalize} yerine row.map(&:capitalize) yazinca Turkce destegi calismiyor. Ornek:

row = ["NEVŞEHİR", "ACIGÖL", "MERKEZKÖYLER", "1 KÜME MAH (AĞILLI KÖYÜ)", "50142"]

row.map {|elem| elem.capitalize} => ["Nevşehir", "Acıgöl", "Merkezköyler", "1 küme mah (ağıllı köyü)", "50142"]

row.map(&:capitalize) => ["NevŞehİr", "AcigÖl", "MerkezkÖyler", "1 kÜme mah (aĞilli kÖyÜ)", "50142"]

Sanirim ikincisinde Proc objesi yarattigi icin oluyor

Stack level too deep error for string_methods

I am trying to comparison strings with usign Ruby upcase method. For example;

banks.select { |b| b["banka"]["bAd"] == bank_name.upcase }

Here when I try to run rspec tests I faced SystemStackError: stack level too deep error. It occurs on

../ruby-2.6.2/gems/turkish_support-1.1.3/lib/turkish_support/string_methods.rb:18

Could you help me?

Cheers.

# frozen_string_literal: true hatası

Sayfanın başına # frozen_string_literal: true magic comment ekledikten sonra upcase ve downcase string fonksiyonlarında can't define singleton gibi bir hata alıyorum.

Usage inside irb

Add usage in irb to README for testing functionality of the gem.

<=> operator

Hi i'm trying to use sort method with <=> operator

.sort { |a,b| a[0] <=> b[0] }

but didn't work

Problem with opening parentheses

'LOREM ( IPSUM)'.titleize
/Users/halil/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/turkish_support-1.0.0/lib/turkish_support/helpers.rb:28:in `prepare_for': Invalid arguments for method `prepare_for`! (ArgumentError)
    from /Users/halil/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/turkish_support-1.0.0/lib/turkish_support/helpers.rb:67:in `prepare_for_capitalize'
    from /Users/halil/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/turkish_support-1.0.0/lib/turkish_support/helpers.rb:31:in `call'
    from /Users/halil/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/turkish_support-1.0.0/lib/turkish_support/helpers.rb:31:in `prepare_for'
    from /Users/halil/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/turkish_support-1.0.0/lib/turkish_support/string_methods.rb:19:in `block (3 levels) in <module:TurkishSupport>'
    from /Users/halil/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/turkish_support-1.0.0/lib/turkish_support/string_methods.rb:30:in `block in titleize'
    from /Users/halil/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/turkish_support-1.0.0/lib/turkish_support/string_methods.rb:25:in `map'
    from /Users/halil/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/turkish_support-1.0.0/lib/turkish_support/string_methods.rb:25:in `titleize'
    from test.rb:9:in `hey'
    from test.rb:13:in `<main>'
'( '.titleize # => <The same error>
'('.titleize # => <The same error>
'LOREM (IPSUM)'.titleize # => Lorem (Ipsum)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.