From: "zhangb (Bushi Zhang)" Date: 2012-08-11T01:27:32+09:00 Subject: [ruby-core:47116] [ruby-trunk - Bug #6853] Regular Expression Bug Issue #6853 has been updated by zhangb (Bushi Zhang). Kindly ignore the rails code. The problem is in: /[a-z][a-z0-9-\s]+/i ---------------------------------------- Bug #6853: Regular Expression Bug https://bugs.ruby-lang.org/issues/6853#change-28766 Author: zhangb (Bushi Zhang) Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0] I'm getting a seg fault with the following code: resources :products, :only => %w(show) do collection do get ':user_platform/:app_guid(/:template)', :action => 'index', :as => '', :defaults => { :template => 'appwall' }, :constraints => { :user_platform => /[a-z][a-z0-9-\s]+/i, :app_guid => /[0-9a-z\-\.]+/i } end end The culprit is the line with :constraints, specifically the trailing '-' in user_platform. I tested the expression on Rubular and it's not a problem. Older versions of ruby will return a warning but won't crash. Removing the '-' fixes the problem. -- http://bugs.ruby-lang.org/