Change soft-fail to use the config, rather than env
[rbx.git] / spec / frozen / 1.8 / language / line_spec.rb
blobc2255a2cdb168b51f8e3f61ecdbcf8a27de5cdef
1 require File.dirname(__FILE__) + '/../spec_helper'
3 describe "The __LINE__ constant" do
4   it "increments for each line" do    
5     cline = __LINE__
6     __LINE__.should == cline + 1
7     # comment is at cline + 2
8     __LINE__.should == cline + 3
9   end
11   it "is eval aware" do
12     eval("__LINE__").should == 1    
13     cmd =<<EOF
14 # comment at line 1
15 __LINE__
16 EOF
17     eval(cmd).should == 2
18   end
19 end