asip-meteor 0.9.2.7 → 0.9.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/meteor.rb +231 -164
  2. metadata +2 -2
data/lib/meteor.rb CHANGED
@@ -18,17 +18,18 @@
18
18
  # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
19
  #
20
20
  # @author Yasumasa Ashida
21
- # @version 0.9.2.7
21
+ # @version 0.9.2.8
22
22
  #
23
23
 
24
24
  module Meteor
25
25
 
26
- VERSION = "0.9.2.7"
26
+ VERSION = "0.9.2.8"
27
27
 
28
28
  RUBY_VERSION_1_9_0 = '1.9.0'
29
29
 
30
30
  if RUBY_VERSION < RUBY_VERSION_1_9_0 then
31
31
  require 'Kconv'
32
+ E_UTF8 = 'UTF8'
32
33
  end
33
34
 
34
35
  ZERO = 0
@@ -915,7 +916,17 @@ module Meteor
915
916
  #SUB_REGEX2 = '\\1\\1\\\\\\\\\\2'
916
917
  #SUB_REGEX3 = '\\1\\1\\1\\1\\\\\\\\\\\\\\\\\\2'
917
918
 
918
- @@pattern_get_attrs_map = Regexp.new(GET_ATTRS_MAP)
919
+ if RUBY_VERSION >= RUBY_VERSION_1_9_0 then
920
+ @@pattern_get_attrs_map = Regexp.new(GET_ATTRS_MAP)
921
+
922
+ @@pattern_clean1 = Regexp.new(CLEAN_1)
923
+ @@pattern_clean2 = Regexp.new(CLEAN_2)
924
+ else
925
+ @@pattern_get_attrs_map = Regexp.new(GET_ATTRS_MAP,nil,E_UTF8)
926
+
927
+ @@pattern_clean1 = Regexp.new(CLEAN_1,nil,E_UTF8)
928
+ @@pattern_clean2 = Regexp.new(CLEAN_2,nil,E_UTF8)
929
+ end
919
930
 
920
931
  #BRAC_OPEN_1 = "\\\("
921
932
  #BRAC_OPEN_2 = "\\\\\\("
@@ -954,10 +965,6 @@ module Meteor
954
965
 
955
966
  #@@pattern_sub_regex1 = Regexp.new(SUB_REGEX1)
956
967
 
957
- @@pattern_clean1 = Regexp.new(CLEAN_1)
958
- @@pattern_clean2 = Regexp.new(CLEAN_2)
959
-
960
-
961
968
  #
962
969
  # イニシャライザ
963
970
  # @param [Array] args 引数配列
@@ -1066,14 +1073,24 @@ module Meteor
1066
1073
  @character_encoding = encoding
1067
1074
  #ファイルのオープン
1068
1075
  if RUBY_VERSION >= RUBY_VERSION_1_9_0 then
1069
- io = File.open(file_path,'r:' << encoding)
1076
+ if "UTF-8".eql?(encoding) then
1077
+ io = File.open(file_path,'r:' << encoding)
1078
+ else
1079
+ io = File.open(file_path,'r:' << encoding << ':utf-8')
1080
+ end
1081
+
1070
1082
  #読込及び格納
1071
1083
  @root.document = io.read
1072
1084
  else
1073
1085
  #読込及び格納
1074
1086
  io = open(file_path,'r')
1075
1087
  @root.document = io.read
1076
- @root.document = @root.document.kconv(get_encoding(), Kconv.guess(@root.document))
1088
+ #@root.document = @root.document.kconv(get_encoding(), Kconv.guess(@root.document))
1089
+ #enc = Kconv.guess(@root.document)
1090
+ enc = get_encoding()
1091
+ if !Kconv::UTF8.equal?(enc) then
1092
+ @root.document = @root.document.kconv(Kconv::UTF8, enc)
1093
+ end
1077
1094
  end
1078
1095
 
1079
1096
  #ファイルのクローズ
@@ -1093,15 +1110,19 @@ module Meteor
1093
1110
 
1094
1111
  end
1095
1112
 
1113
+ #if RUBY_VERSION < RUBY_VERSION_1_9_0 then
1096
1114
  def get_encoding()
1097
1115
  case @character_encoding
1098
- when 'UTF-8'
1116
+ when 'UTF-8','UTF8','u','U'
1117
+ @encoding = 'UTF8'
1099
1118
  Kconv::UTF8
1100
- when 'ISO-2022-JP'
1119
+ when 'ISO-2022-JP','JIS'
1101
1120
  Kconv::JIS
1102
- when 'Shift_JIS'
1121
+ when 'Shift_JIS','SJIS','s','S'
1122
+ @encoding = 'SJIS'
1103
1123
  Kconv::SJIS
1104
- when 'EUC-JP'
1124
+ when 'EUC-JP','EUC','e','E'
1125
+ @encoding = 'EUC'
1105
1126
  Kconv::EUC
1106
1127
  when 'ASCII'
1107
1128
  Kconv::ASCII
@@ -1112,6 +1133,7 @@ module Meteor
1112
1133
  end
1113
1134
  end
1114
1135
  private :get_encoding
1136
+ #end
1115
1137
 
1116
1138
  #
1117
1139
  # 要素を取得する
@@ -1139,7 +1161,7 @@ module Meteor
1139
1161
  end
1140
1162
  when THREE
1141
1163
  element_3(args[0],args[1],args[2])
1142
- if @elm_ then
1164
+ if @elm_ then
1143
1165
  @element_cache.store(@elm_.object_id,@elm_)
1144
1166
  end
1145
1167
  when FOUR
@@ -2692,14 +2714,22 @@ module Meteor
2692
2714
  if !@@regex_cache[regex.to_sym] then
2693
2715
  #pattern = Regexp.new(regex)
2694
2716
  #@@regex_cache[regex] = pattern
2695
- @@regex_cache[regex.to_sym] = Regexp.new(regex, Regexp::MULTILINE)
2717
+ if RUBY_VERSION >= RUBY_VERSION_1_9_0 then
2718
+ @@regex_cache[regex.to_sym] = Regexp.new(regex, Regexp::MULTILINE)
2719
+ else
2720
+ @@regex_cache[regex.to_sym] = Regexp.new(regex, Regexp::MULTILINE,E_UTF8)
2721
+ end
2696
2722
  end
2697
2723
 
2698
2724
  #return pattern
2699
2725
  @@regex_cache[regex.to_sym]
2700
2726
  elsif regex.kind_of?(Symbol) then
2701
2727
  if !@@regex_cache[regex] then
2702
- @@regex_cache[regex] = Regexp.new(regex.to_s, Regexp::MULTILINE)
2728
+ if RUBY_VERSION >= RUBY_VERSION_1_9_0 then
2729
+ @@regex_cache[regex] = Regexp.new(regex.to_s, Regexp::MULTILINE)
2730
+ else
2731
+ @@regex_cache[regex] = Regexp.new(regex.to_s, Regexp::MULTILINE,E_UTF8)
2732
+ end
2703
2733
  end
2704
2734
 
2705
2735
  @@regex_cache[regex]
@@ -2719,14 +2749,14 @@ module Meteor
2719
2749
  if !@@regex_cache[regex.to_sym] then
2720
2750
  #pattern = Regexp.new(regex)
2721
2751
  #@@regex_cache[regex] = pattern
2722
- @@regex_cache[regex.to_sym] = Regexp.new(regex, option)
2752
+ @@regex_cache[regex.to_sym] = Regexp.new(regex, option,E_UTF8)
2723
2753
  end
2724
2754
 
2725
2755
  #return pattern
2726
2756
  @@regex_cache[regex.to_sym]
2727
2757
  elsif regex.kind_of?(Symbol) then
2728
2758
  if !@@regex_cache[regex] then
2729
- @@regex_cache[regex] = Regexp.new(regex.to_s, option)
2759
+ @@regex_cache[regex] = Regexp.new(regex.to_s, option,E_UTF8)
2730
2760
  end
2731
2761
 
2732
2762
  @@regex_cache[regex]
@@ -2734,87 +2764,91 @@ module Meteor
2734
2764
  end
2735
2765
  end
2736
2766
 
2737
- if RUBY_VERSION < RUBY_VERSION_1_9_0 then
2738
- class OrderHash < Hash
2739
2767
 
2740
- def initialize
2741
- @keys = Array.new
2742
- @values = Array.new
2743
- end
2768
+ #if RUBY_VERSION < RUBY_VERSION_1_9_0 then
2744
2769
 
2745
- attr_accessor :keys
2746
- attr_accessor :values
2770
+ class OrderHash < Hash
2747
2771
 
2748
- def store(key, value)
2749
- super(key, value)
2750
- unless @keys.include?(key)
2751
- @keys << key
2752
- @values << value
2753
- end
2754
- end
2772
+ def initialize
2773
+ @keys = Array.new
2774
+ @values = Array.new
2775
+ end
2755
2776
 
2756
- def clear
2757
- @keys.clear
2758
- @values.clear
2759
- super
2760
- end
2777
+ attr_accessor :keys
2778
+ attr_accessor :values
2761
2779
 
2762
- def delete(key)
2763
- if @keys.include?(key)
2764
- @keys.delete(key)
2765
- @values.delete(fetch(key))
2766
- super(key)
2767
- elsif yield(key)
2768
- end
2780
+ def store(key, value)
2781
+ unless @keys.include?(key)
2782
+ @keys << key
2783
+ @values << value
2769
2784
  end
2785
+ super(key, value)
2786
+ end
2770
2787
 
2771
- #superとして、Hash#[]=を呼び出す
2788
+ def clear
2789
+ @keys.clear
2790
+ @values.clear
2791
+ super
2792
+ end
2772
2793
 
2773
- def []=(key, value)
2774
- store(key, value)
2794
+ def delete(key)
2795
+ if @keys.include?(key)
2796
+ @keys.delete(key)
2797
+ @values.delete(fetch(key))
2798
+ super(key)
2799
+ elsif yield(key)
2775
2800
  end
2801
+ end
2776
2802
 
2777
- def each
2778
- @keys.each do |k|
2779
- arr_tmp = Array.new
2780
- arr_tmp << k
2781
- arr_tmp << self[k]
2782
- yield(arr_tmp)
2783
- end
2784
- return self
2803
+ #superとして、Hash#[]=を呼び出す
2804
+
2805
+ def []=(key, value)
2806
+ store(key, value)
2807
+ end
2808
+
2809
+ def each
2810
+ @keys.each do |k|
2811
+ arr_tmp = Array.new
2812
+ arr_tmp << k
2813
+ arr_tmp << self[k]
2814
+ yield(arr_tmp)
2785
2815
  end
2816
+ return self
2817
+ end
2786
2818
 
2787
- def each_pair
2788
- @keys.each do |k|
2789
- yield(k, self[k])
2790
- end
2791
- return self
2819
+ def each_pair
2820
+ @keys.each do |k|
2821
+ yield(k, self[k])
2792
2822
  end
2823
+ return self
2824
+ end
2793
2825
 
2794
- def map
2795
- arr_tmp = Array.new
2796
- @keys.each do |k|
2797
- arg_arr = Array.new
2798
- arg_arr << k
2799
- arg_arr << self[k]
2800
- arr_tmp << yield(arg_arr)
2801
- end
2802
- return arr_tmp
2826
+ def map
2827
+ arr_tmp = Array.new
2828
+ @keys.each do |k|
2829
+ arg_arr = Array.new
2830
+ arg_arr << k
2831
+ arg_arr << self[k]
2832
+ arr_tmp << yield(arg_arr)
2803
2833
  end
2834
+ return arr_tmp
2835
+ end
2804
2836
 
2805
- def sort_hash(&block)
2806
- if block_given?
2807
- arr_tmp = self.sort(&block)
2808
- elsif arr_tmp = self.sort
2809
- end
2810
- hash_tmp = OrderHash.new
2811
- arr_tmp.each do |item|
2812
- hash_tmp[item[0]] = item[1]
2813
- end
2814
- return hash_tmp
2837
+ def sort_hash(&block)
2838
+ if block_given?
2839
+ arr_tmp = self.sort(&block)
2840
+ elsif arr_tmp = self.sort
2815
2841
  end
2842
+ hash_tmp = OrderHash.new
2843
+ arr_tmp.each do |item|
2844
+ hash_tmp[item[0]] = item[1]
2845
+ end
2846
+ return hash_tmp
2816
2847
  end
2817
2848
  end
2849
+
2850
+ #end
2851
+
2818
2852
  end
2819
2853
 
2820
2854
  module Html
@@ -2888,17 +2922,6 @@ module Meteor
2888
2922
  #MULTIPLE_M = [' multiple ',' multiple',' MULTIPLE ',' MULTIPLE']
2889
2923
  MULTIPLE_R = 'multiple\\s|multiple$|MULTIPLE\\s|MULTIPLE$'
2890
2924
 
2891
- @@pattern_selected_m = Regexp.new(SELECTED_M)
2892
- @@pattern_selected_r = Regexp.new(SELECTED_R)
2893
- @@pattern_checked_m = Regexp.new(CHECKED_M)
2894
- @@pattern_checked_r = Regexp.new(CHECKED_R)
2895
- @@pattern_disabled_m = Regexp.new(DISABLED_M)
2896
- @@pattern_disabled_r = Regexp.new(DISABLED_R)
2897
- @@pattern_readonly_m = Regexp.new(READONLY_M)
2898
- @@pattern_readonly_r = Regexp.new(READONLY_R)
2899
- @@pattern_multiple_m = Regexp.new(MULTIPLE_M)
2900
- @@pattern_multiple_r = Regexp.new(MULTIPLE_R)
2901
-
2902
2925
  TRUE = 'true'
2903
2926
  FALSE = 'false'
2904
2927
 
@@ -2908,7 +2931,21 @@ module Meteor
2908
2931
  TYPE_L = 'type'
2909
2932
  TYPE_U = 'TYPE'
2910
2933
 
2934
+ PATTERN_UNESCAPE = '&(amp|quot|apos|gt|lt|nbsp);'
2935
+ GET_ATTRS_MAP2='\\s(disabled|readonly|checked|selected|multiple)'
2936
+
2911
2937
  if RUBY_VERSION >= RUBY_VERSION_1_9_0 then
2938
+ @@pattern_selected_m = Regexp.new(SELECTED_M)
2939
+ @@pattern_selected_r = Regexp.new(SELECTED_R)
2940
+ @@pattern_checked_m = Regexp.new(CHECKED_M)
2941
+ @@pattern_checked_r = Regexp.new(CHECKED_R)
2942
+ @@pattern_disabled_m = Regexp.new(DISABLED_M)
2943
+ @@pattern_disabled_r = Regexp.new(DISABLED_R)
2944
+ @@pattern_readonly_m = Regexp.new(READONLY_M)
2945
+ @@pattern_readonly_r = Regexp.new(READONLY_R)
2946
+ @@pattern_multiple_m = Regexp.new(MULTIPLE_M)
2947
+ @@pattern_multiple_r = Regexp.new(MULTIPLE_R)
2948
+
2912
2949
  TABLE_FOR_ESCAPE_ = {
2913
2950
  '&' => '&amp;',
2914
2951
  '"' => '&quot;',
@@ -2936,32 +2973,43 @@ module Meteor
2936
2973
  @@pattern_escape = Regexp.new(PATTERN_ESCAPE)
2937
2974
  @@pattern_escape_content = Regexp.new(PATTERN_ESCAPE_CONTENT)
2938
2975
  @@pattern_br_2 = Regexp.new(BR_2)
2976
+
2977
+ @@pattern_unescape = Regexp.new(PATTERN_UNESCAPE)
2978
+ @@pattern_set_mono1 = Regexp.new(SET_MONO_1)
2979
+ @@pattern_get_attrs_map2 = Regexp.new(GET_ATTRS_MAP2)
2939
2980
  else
2940
- @@pattern_and_1 = Regexp.new(AND_1)
2941
- @@pattern_lt_1 = Regexp.new(LT_1)
2942
- @@pattern_gt_1 = Regexp.new(GT_1)
2943
- @@pattern_dq_1 = Regexp.new(DOUBLE_QUATATION)
2944
- @@pattern_space_1 = Regexp.new(SPACE)
2945
- @@pattern_br_1 = Regexp.new(BR_1)
2946
- @@pattern_lt_2 = Regexp.new(LT_2)
2947
- @@pattern_gt_2 = Regexp.new(GT_2)
2948
- @@pattern_dq_2 = Regexp.new(QO_2)
2949
- @@pattern_space_2 = Regexp.new(NBSP_2)
2950
- @@pattern_and_2 = Regexp.new(AND_2)
2951
- @@pattern_br_2 = Regexp.new(BR_2)
2981
+ @@pattern_selected_m = Regexp.new(SELECTED_M,nil,E_UTF8)
2982
+ @@pattern_selected_r = Regexp.new(SELECTED_R,nil,E_UTF8)
2983
+ @@pattern_checked_m = Regexp.new(CHECKED_M,nil,E_UTF8)
2984
+ @@pattern_checked_r = Regexp.new(CHECKED_R,nil,E_UTF8)
2985
+ @@pattern_disabled_m = Regexp.new(DISABLED_M,nil,E_UTF8)
2986
+ @@pattern_disabled_r = Regexp.new(DISABLED_R,nil,E_UTF8)
2987
+ @@pattern_readonly_m = Regexp.new(READONLY_M,nil,E_UTF8)
2988
+ @@pattern_readonly_r = Regexp.new(READONLY_R,nil,E_UTF8)
2989
+ @@pattern_multiple_m = Regexp.new(MULTIPLE_M,nil,E_UTF8)
2990
+ @@pattern_multiple_r = Regexp.new(MULTIPLE_R,nil,E_UTF8)
2991
+
2992
+ @@pattern_and_1 = Regexp.new(AND_1,nil,E_UTF8)
2993
+ @@pattern_lt_1 = Regexp.new(LT_1,nil,E_UTF8)
2994
+ @@pattern_gt_1 = Regexp.new(GT_1,nil,E_UTF8)
2995
+ @@pattern_dq_1 = Regexp.new(DOUBLE_QUATATION,nil,E_UTF8)
2996
+ @@pattern_space_1 = Regexp.new(SPACE,nil,E_UTF8)
2997
+ @@pattern_br_1 = Regexp.new(BR_1,nil,E_UTF8)
2998
+ @@pattern_lt_2 = Regexp.new(LT_2,nil,E_UTF8)
2999
+ @@pattern_gt_2 = Regexp.new(GT_2,nil,E_UTF8)
3000
+ @@pattern_dq_2 = Regexp.new(QO_2,nil,E_UTF8)
3001
+ @@pattern_space_2 = Regexp.new(NBSP_2,nil,E_UTF8)
3002
+ @@pattern_and_2 = Regexp.new(AND_2,nil,E_UTF8)
3003
+ @@pattern_br_2 = Regexp.new(BR_2,nil,E_UTF8)
3004
+
3005
+ @@pattern_unescape = Regexp.new(PATTERN_UNESCAPE,nil,E_UTF8)
3006
+ @@pattern_set_mono1 = Regexp.new(SET_MONO_1,nil,E_UTF8)
3007
+ @@pattern_get_attrs_map2 = Regexp.new(GET_ATTRS_MAP2,nil,E_UTF8)
2952
3008
  end
2953
3009
 
2954
-
2955
- PATTERN_UNESCAPE = '&(amp|quot|apos|gt|lt|nbsp);'
2956
- @@pattern_unescape = Regexp.new(PATTERN_UNESCAPE)
2957
-
2958
3010
  #@@pattern_match_tag = Regexp.new(MATCH_TAG)
2959
- @@pattern_set_mono1 = Regexp.new(SET_MONO_1)
2960
3011
  #@@pattern_match_tag2 = Regexp.new(MATCH_TAG_2)
2961
3012
 
2962
- GET_ATTRS_MAP2='\\s(disabled|readonly|checked|selected|multiple)'
2963
- @@pattern_get_attrs_map2 = Regexp.new(GET_ATTRS_MAP2)
2964
-
2965
3013
  #
2966
3014
  # イニシャライザ
2967
3015
  #
@@ -3672,29 +3720,31 @@ module Meteor
3672
3720
  CONTENT_TYPE = 'Content-Type'
3673
3721
  CONTENT = 'content'
3674
3722
 
3675
- @@pattern_selected_m = Regexp.new(SELECTED_M)
3676
- @@pattern_selected_m1 = Regexp.new(SELECTED_M1)
3677
- @@pattern_selected_r = Regexp.new(SELECTED_R)
3678
- @@pattern_checked_m = Regexp.new(CHECKED_M)
3679
- @@pattern_checked_m1 = Regexp.new(CHECKED_M1)
3680
- @@pattern_checked_r = Regexp.new(CHECKED_R)
3681
- @@pattern_disabled_m = Regexp.new(DISABLED_M)
3682
- @@pattern_disabled_m1 = Regexp.new(DISABLED_M1)
3683
- @@pattern_disabled_r = Regexp.new(DISABLED_R)
3684
- @@pattern_readonly_m = Regexp.new(READONLY_M)
3685
- @@pattern_readonly_m1 = Regexp.new(READONLY_M1)
3686
- @@pattern_readonly_r = Regexp.new(READONLY_R)
3687
- @@pattern_multiple_m = Regexp.new(MULTIPLE_M)
3688
- @@pattern_multiple_m1 = Regexp.new(MULTIPLE_M1)
3689
- @@pattern_multiple_r = Regexp.new(MULTIPLE_R)
3690
-
3691
3723
  TRUE = 'true'
3692
3724
  FALSE = 'false'
3693
3725
 
3694
3726
  TYPE_L = 'type'
3695
3727
  TYPE_U = 'TYPE'
3696
3728
 
3729
+ PATTERN_UNESCAPE = '&(amp|quot|apos|gt|lt|nbsp);'
3730
+
3697
3731
  if RUBY_VERSION >= RUBY_VERSION_1_9_0 then
3732
+ @@pattern_selected_m = Regexp.new(SELECTED_M)
3733
+ @@pattern_selected_m1 = Regexp.new(SELECTED_M1)
3734
+ @@pattern_selected_r = Regexp.new(SELECTED_R)
3735
+ @@pattern_checked_m = Regexp.new(CHECKED_M)
3736
+ @@pattern_checked_m1 = Regexp.new(CHECKED_M1)
3737
+ @@pattern_checked_r = Regexp.new(CHECKED_R)
3738
+ @@pattern_disabled_m = Regexp.new(DISABLED_M)
3739
+ @@pattern_disabled_m1 = Regexp.new(DISABLED_M1)
3740
+ @@pattern_disabled_r = Regexp.new(DISABLED_R)
3741
+ @@pattern_readonly_m = Regexp.new(READONLY_M)
3742
+ @@pattern_readonly_m1 = Regexp.new(READONLY_M1)
3743
+ @@pattern_readonly_r = Regexp.new(READONLY_R)
3744
+ @@pattern_multiple_m = Regexp.new(MULTIPLE_M)
3745
+ @@pattern_multiple_m1 = Regexp.new(MULTIPLE_M1)
3746
+ @@pattern_multiple_r = Regexp.new(MULTIPLE_R)
3747
+
3698
3748
  TABLE_FOR_ESCAPE_ = {
3699
3749
  '&' => '&amp;',
3700
3750
  '"' => '&quot;',
@@ -3721,30 +3771,46 @@ module Meteor
3721
3771
  @@pattern_escape = Regexp.new(PATTERN_ESCAPE)
3722
3772
  @@pattern_escape_content = Regexp.new(PATTERN_ESCAPE_CONTENT)
3723
3773
  @@pattern_br_2 = Regexp.new(BR_3)
3724
- else
3725
-
3726
- @@pattern_and_1 = Regexp.new(AND_1)
3727
- @@pattern_lt_1 = Regexp.new(LT_1)
3728
- @@pattern_gt_1 = Regexp.new(GT_1)
3729
- @@pattern_dq_1 = Regexp.new(DOUBLE_QUATATION)
3730
- @@pattern_ap_1 = Regexp.new(AP_1)
3731
- @@pattern_space_1 = Regexp.new(SPACE)
3732
- @@pattern_br_1 = Regexp.new(BR_1)
3733
- @@pattern_lt_2 = Regexp.new(LT_2)
3734
- @@pattern_gt_2 = Regexp.new(GT_2)
3735
- @@pattern_dq_2 = Regexp.new(QO_2)
3736
- @@pattern_ap_2 = Regexp.new(AP_2)
3737
- @@pattern_space_2 = Regexp.new(NBSP_2)
3738
- @@pattern_and_2 = Regexp.new(AND_2)
3739
- @@pattern_br_2 = Regexp.new(BR_3)
3740
3774
 
3775
+ @@pattern_unescape = Regexp.new(PATTERN_UNESCAPE)
3776
+ @@pattern_set_mono1 = Regexp.new(SET_MONO_1)
3777
+ else
3778
+ @@pattern_selected_m = Regexp.new(SELECTED_M,nil,E_UTF8)
3779
+ @@pattern_selected_m1 = Regexp.new(SELECTED_M1,nil,E_UTF8)
3780
+ @@pattern_selected_r = Regexp.new(SELECTED_R,nil,E_UTF8)
3781
+ @@pattern_checked_m = Regexp.new(CHECKED_M,nil,E_UTF8)
3782
+ @@pattern_checked_m1 = Regexp.new(CHECKED_M1,nil,E_UTF8)
3783
+ @@pattern_checked_r = Regexp.new(CHECKED_R,nil,E_UTF8)
3784
+ @@pattern_disabled_m = Regexp.new(DISABLED_M,nil,E_UTF8)
3785
+ @@pattern_disabled_m1 = Regexp.new(DISABLED_M1,nil,E_UTF8)
3786
+ @@pattern_disabled_r = Regexp.new(DISABLED_R,nil,E_UTF8)
3787
+ @@pattern_readonly_m = Regexp.new(READONLY_M,nil,E_UTF8)
3788
+ @@pattern_readonly_m1 = Regexp.new(READONLY_M1,nil,E_UTF8)
3789
+ @@pattern_readonly_r = Regexp.new(READONLY_R,nil,E_UTF8)
3790
+ @@pattern_multiple_m = Regexp.new(MULTIPLE_M,nil,E_UTF8)
3791
+ @@pattern_multiple_m1 = Regexp.new(MULTIPLE_M1,nil,E_UTF8)
3792
+ @@pattern_multiple_r = Regexp.new(MULTIPLE_R,nil,E_UTF8)
3793
+
3794
+ @@pattern_and_1 = Regexp.new(AND_1,nil,E_UTF8)
3795
+ @@pattern_lt_1 = Regexp.new(LT_1,nil,E_UTF8)
3796
+ @@pattern_gt_1 = Regexp.new(GT_1,nil,E_UTF8)
3797
+ @@pattern_dq_1 = Regexp.new(DOUBLE_QUATATION,nil,E_UTF8)
3798
+ @@pattern_ap_1 = Regexp.new(AP_1,nil,E_UTF8)
3799
+ @@pattern_space_1 = Regexp.new(SPACE,nil,E_UTF8)
3800
+ @@pattern_br_1 = Regexp.new(BR_1,nil,E_UTF8)
3801
+ @@pattern_lt_2 = Regexp.new(LT_2,nil,E_UTF8)
3802
+ @@pattern_gt_2 = Regexp.new(GT_2,nil,E_UTF8)
3803
+ @@pattern_dq_2 = Regexp.new(QO_2,nil,E_UTF8)
3804
+ @@pattern_ap_2 = Regexp.new(AP_2,nil,E_UTF8)
3805
+ @@pattern_space_2 = Regexp.new(NBSP_2,nil,E_UTF8)
3806
+ @@pattern_and_2 = Regexp.new(AND_2,nil,E_UTF8)
3807
+ @@pattern_br_2 = Regexp.new(BR_3,nil,E_UTF8)
3808
+
3809
+ @@pattern_unescape = Regexp.new(PATTERN_UNESCAPE,nil,E_UTF8)
3810
+ @@pattern_set_mono1 = Regexp.new(SET_MONO_1,nil,E_UTF8)
3741
3811
  end
3742
3812
 
3743
- PATTERN_UNESCAPE = '&(amp|quot|apos|gt|lt|nbsp);'
3744
- @@pattern_unescape = Regexp.new(PATTERN_UNESCAPE)
3745
-
3746
3813
  #@@pattern_match_tag = Regexp.new(MATCH_TAG)
3747
- @@pattern_set_mono1 = Regexp.new(SET_MONO_1)
3748
3814
  #@@pattern_match_tag2 = Regexp.new(MATCH_TAG_2)
3749
3815
 
3750
3816
  #
@@ -4134,6 +4200,8 @@ module Meteor
4134
4200
  #
4135
4201
  class ParserImpl < Meteor::Core::Kernel
4136
4202
 
4203
+ PATTERN_UNESCAPE = '&(amp|quot|apos|gt|lt);'
4204
+
4137
4205
  if RUBY_VERSION >= RUBY_VERSION_1_9_0 then
4138
4206
  TABLE_FOR_ESCAPE_ = {
4139
4207
  '&' => '&amp;',
@@ -4144,26 +4212,25 @@ module Meteor
4144
4212
  }
4145
4213
  PATTERN_ESCAPE = '[&\"\'<>]'
4146
4214
  @@pattern_escape = Regexp.new(PATTERN_ESCAPE)
4215
+
4216
+ @@pattern_unescape = Regexp.new(PATTERN_UNESCAPE)
4217
+ @@pattern_set_mono1 = Regexp.new(SET_MONO_1)
4147
4218
  else
4148
- @@pattern_and_1 = Regexp.new(AND_1)
4149
- @@pattern_lt_1 = Regexp.new(LT_1)
4150
- @@pattern_gt_1 = Regexp.new(GT_1)
4151
- @@pattern_dq_1 = Regexp.new(DOUBLE_QUATATION)
4152
- @@pattern_ap_1 = Regexp.new(AP_1)
4153
- @@pattern_lt_2 = Regexp.new(LT_2)
4154
- @@pattern_gt_2 = Regexp.new(GT_2)
4155
- @@pattern_dq_2 = Regexp.new(QO_2)
4156
- @@pattern_ap_2 = Regexp.new(AP_2)
4157
- @@pattern_and_2 = Regexp.new(AND_2)
4219
+ @@pattern_and_1 = Regexp.new(AND_1,nil,E_UTF8)
4220
+ @@pattern_lt_1 = Regexp.new(LT_1,nil,E_UTF8)
4221
+ @@pattern_gt_1 = Regexp.new(GT_1,nil,E_UTF8)
4222
+ @@pattern_dq_1 = Regexp.new(DOUBLE_QUATATION,nil,E_UTF8)
4223
+ @@pattern_ap_1 = Regexp.new(AP_1,nil,E_UTF8)
4224
+ @@pattern_lt_2 = Regexp.new(LT_2,nil,E_UTF8)
4225
+ @@pattern_gt_2 = Regexp.new(GT_2,nil,E_UTF8)
4226
+ @@pattern_dq_2 = Regexp.new(QO_2,nil,E_UTF8)
4227
+ @@pattern_ap_2 = Regexp.new(AP_2,nil,E_UTF8)
4228
+ @@pattern_and_2 = Regexp.new(AND_2,nil,E_UTF8)
4229
+
4230
+ @@pattern_unescape = Regexp.new(PATTERN_UNESCAPE,nil,E_UTF8)
4231
+ @@pattern_set_mono1 = Regexp.new(SET_MONO_1,nil,E_UTF8)
4158
4232
  end
4159
4233
 
4160
-
4161
-
4162
- PATTERN_UNESCAPE = '&(amp|quot|apos|gt|lt);'
4163
- @@pattern_unescape = Regexp.new(PATTERN_UNESCAPE)
4164
-
4165
- @@pattern_set_mono1 = Regexp.new(SET_MONO_1)
4166
-
4167
4234
  #
4168
4235
  # イニシャライザ
4169
4236
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asip-meteor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2.7
4
+ version: 0.9.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - asip
@@ -9,7 +9,7 @@ autorequire: meteor
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-06 00:00:00 -07:00
12
+ date: 2009-07-10 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15