The default encoding for ruby scripts is now UTF-8 [#6679]. Some people report that it affects existing programs, such as some benchmark programs becoming very slow [ruby-dev:46547]. Iconv was removed, which had already been deprecated when M17N was introduced in ruby 1.9. Use String#...
I've known Ruby since she was just 4 or 5 years old. Of course, I knew her parents, Smalltalk and Perl, and had a nodding acquaintance with Aunt Clu, so I knew she was in good hands. I watched with pleasure as she took her first tentative steps into the wide world. Even as a young lan...
Rubyist Hotlinks 【第 31 回】 樽家昌也さん Rubyist へのインタビュー企画。今回はたるいさんにお話を伺いました。(難易度:ポケコン) Ruby 2.0.0 リリース特集 編集:ささだ 2013 年 2 月 24 日に Ruby 2.0.0 がリリースされました。しかし、何が変わったか、あまり情報がまとまっていないのが実情です。そこで、Ruby 開発者の人たちに Ruby 2.0.0 の機能や改善についてご紹介頂き、特集記事としてまとめました。 このページは各記事の紹介と、著名 Rubyist によるコメントを掲載しています。(難易度:移...
<URL:ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.bz2> SIZE: 10814890 bytes MD5: 895c1c581f8d28e8b3bb02472b2ccf6a SHA256: c680d392ccc4901c32067576f5b474ee186def2fcd3fcbfa485739168093295f <URL:ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz> SIZE: 13608925 bytes MD5...
class AcceptAnswerActivity < AbstractActivity attribute :answer attribute :questioner validates_signin_of :questioner validate do errors.add :questioner, :accepter_should_questioner unless question.author?(questioner) errors.add :question, :question_should_be_open unless question.stat...
fizzbuzz = Enumerator.new{|yielder| 1.upto(Float::INFINITY) |n| case when n % 15 == 0 then yielder << "FizzBuzz" when n % 5 == 0 then yielder << "Buzz" when n % 3 == 0 then yielder << "Fizz" else yielder << n.to_s end end } fizzbuzz.each do |str| puts str end
class BDBError < RuntimeError def initialize(bdb) super(bdb.errmsg(bdb.ecode)) end end class BDB < TokyoCabinet::BDB def exception BDBError.new(self) end def cursor TokyoCabinet::BDBCUR.new(self) end def self.call_or_die(*ary) file, lineno = __FILE__, __LINE__ if /^(.+?):(\d+)(?::in `...
$ ruby -e 'module M; refine String do end; end' -e:1: warning: Refinements are experimental, and the behavior may change in future versions of Ruby!
例えば、Senna/Tritonn を Solr に、MySQL based logging を Fluentd/TreasureDate に、(Tritonn/)MySQL5.0 を MySQL5.5 に変更することをされました。
Badminton Theater, Olympic Properties Goudi, Athens, Greece
Assist in concept development and design of website, graphic design skills, social media integration, multimedia material, fee quotation, invoice generation and online credit card payment system. Front end should be innovative in design and drive traffic and business through content g...
Magic Comment を書いていないファイルの文字列リテラルのエンコーディング (default script encoding) が UTF-8 に変更されました。[#6679] Ruby 1.9 においては、default script encoding は US-ASCII でした。しかし、以下のようなメリット・デメリットを考えた結果、上記の通り UTF-8 へと変更することになりました。 21世紀の現代においてはほとんどのコードが UTF-8 であるため、デフォルトが UTF-8 であった方が便利 1.9 向けの Magic Comment の書かれ...
このメソッドは引数無しで呼び出すと、level: "ERROR", time: Time.now が渡されたのと同じように動きます。 log("Hello!") #=> Mon Feb 18 01:46:22 2013 [ERROR] Hello! log("Hello!", level: "ERROR", time: Time.now) #=> Mon Feb 18 01:46:22 2013 [ERROR] Hello! キーワード引数の順番は順不同です。(ただし、他の種類の引数と順番を変えることはできません) log("Hello!", time: Time...
The default output encoding for RDoc is now UTF-8. Previously RDoc used the default external encoding which was determined from your locale. Issue #106 by Justin Baker. RDoc::RI::Store is now RDoc::Store so ri data generated by RDoc 4 cannot be read by earlier versions of RDoc. RDoc::...
Almost 8 seconds of Rails load time. Which is, whatever. But then my attention was drawn to the rcov report. I'm growing tired of this crappy rcov report that seems to slow things down and honestly doesn't provide any information on an "every time my specs run" basis, but when I want ...
Rubyで安全なWebアプリを作るためのメモ (2) Feb 21st , 2012 前回の記事 のはてブのコメント でrack-protection についての言及がないというご指摘をいただきました。恥ずかしながらrack-protectionについては知らなかったので、少し調べてみました。 rack-protectionは、CSRFやXSSをはじめとした攻撃に対処するためのRack middlewareです。アプリケーションを起動する前にuse Rack::Protectionを呼び出して組み込むことですべての機能を簡単に利用できます。 require 'ra...
files=2000 begin files.times{|i| file = "req/file#{i}.rb" open(file,"wb"){} } rescue end 100.times{ $LOAD_PATH << "/" } #gemsの代わり $LOAD_PATH << "." start = Time.now cnt=0 files.times{|j| file = "req/file#{j}.rb" require file cnt +=1 puts "#{cnt}, #{Time.now - start}" if cnt % 100 == 0 }
I was in an Independent Study for a class at my University last semester to learn Ruby on Rails. I picked up a ton of great things, and built a pretty cool project, but there are still a few errors in it. I would like to host the project on GitHub and continue to add more features, bu...
以下のプログラムを t.rb というファイルとして保存します。 class Foo def hello puts :hello end end 5.times do foo = Foo.new foo.hello sleep 1 end ruby:::method-entry という probe には、 呼ばれたときにクラス名とメソッド名が渡されます。 以下のコードが書かれた x.d というファイルを作ります。 ruby$target:::method-entry { printf("%s#%s\n", copyinstr(arg0), copyinstr(arg...
The default encoding for ruby scripts is now UTF-8 [#6679]. Some people report that it affects existing programs, such as some benchmark programs becoming very slow [ruby-dev:46547]. Iconv was removed, which had already been deprecated when M17N was introduced in ruby 1.9. Use String#...
The default encoding for ruby scripts is now UTF-8 [#6679]. Some people report that it affects existing programs, such as some benchmark programs becoming very slow [ruby-dev:46547]. Iconv was removed, which had already been deprecated when M17N was introduced in ruby 1.9. Use String#...
Hacker News new | comments | ask | jobs | submit login Does Ruby 2 Load Rails Twice As Fast? (superpumpup.com) 4 points by alkaloids 16 hours ago | discuss Lists | RSS | Bookmarklet | Guidelines | FAQ | DMCA | News News | Feature Requests | Y Combinator | Apply | Library Search:
My client is looking for a developer with the following experience * Around 4-6+ years of work experience. * Around 2-3+ years of experience in Java, Jruby, WAP applications, telco experience, Ruby on Rails. * Understand the requirements (both functional and non-functional) by going t...
Log in and get to work Remember me next time Forgot password? Forgot username?