ruby-1.8
Accessing FB Graph API using Ruby 1.8 and Rails
I\'m adding Facebook functionality on to a开发者_开发知识库 site running Ruby 1.8.6 and rails 1.2.3.[详细]
2023-04-08 18:59 分类:问答Can I dynamically define a Ruby method that takes a block?
I know that I can dynamically define methods on a class using define_method, and that I specify the parameters this method take开发者_高级运维s using the arity of the block.[详细]
2023-04-08 02:04 分类:问答Testing Ruby code snippets with eval() in Ruby 1.9
I would like to use eval() in Ruby 1.9 to test little pieces of ruby code in an interactive way. A long time ago (around Ruby 1.4) I found a neat script on the internet providing this functionality开发[详细]
2023-04-03 23:08 分类:问答How to get the i'th character from utf-8 String in Ruby 1.8.7?
Given the following const开发者_StackOverflowant: RUSSIAN_LOWERCASE_ALPHABET = \"абвгдеёжзийклмнопрстуфхцчшщъыьэюя\"[详细]
2023-04-01 05:11 分类:问答Why isn't 'logger.debug false' printing anything?
I\'m having a problem with a boolean expression and when I did a logger.debug I had strange results, so I simplified my logging code to the following and was surprised not to see any \'false\' being p[详细]
2023-03-28 09:10 分类:问答"test".partition("s") calls partition from Enumerable module instead of String module
I have tried to partition a string using the partition method from the String module. However, when doing so:[详细]
2023-03-16 16:25 分类:问答Why is Symbol#to_proc slower in Ruby 1.8.7?
Relative Performance of Symbol#to_proc in Popular Ruby Implementations states that in MRI Ruby 1.8.7, Symbol#to_proc is slower than the alternative in their benchmark by 30% to 130%, but that this isn[详细]
2023-03-16 00:23 分类:问答Using string[range]=new_val while respecting UTF8 in Ruby 1.8.7
I have code like text[from..to] = text_insertion The problem is that from and to a开发者_运维技巧re given counting UTF8 encoded characters as one char while the code above counts byte-wise in Ruby[详细]
2023-03-15 11:31 分类:问答Why begin/rescue/else behaves differently on 1.9.2 and 1.8.7
I am working with t开发者_JAVA技巧he method mm. In ruby 1.9.2 it behaves weird, instead of the expected result 1.9.2=>10 I am getting[详细]
2023-03-14 23:13 分类:问答Ruby Permutation (Builtin) - Result does not contain adjacent identical letters
Thank you for your help yesterday and for teaching me something new as well. :) I have another question based on permutation... the algorithm I have works however I have the开发者_StackOverflow中文版[详细]
2023-03-09 23:28 分类:问答