The rule is “God hath said, Ye shall not eat of it, neither shall ye touch it, lest ye die.” (Gen 3:3) Interestingly, we do not know how she learned it. Eve was not yet made when God gave Adam the rule (2:16-17). So either Adam told her, or God himself told her. God never said “neither shall you touch it,” as Eve says at Gen 3:3, so where did she get that? Again, interestingly, we do not know. She could have been told this by Adam or God. In either case, one of them would perhaps have trusted her even less than Adam to avoid the temptation of the forbidden fruit, and perhaps felt it appropriate to strengthen the rule for her benefit. If so, then it would be ironic that the stronger version of the rule did not help her. It is worth noting that in another holy place of God, the Israelites at Mount Sinai are sternly instructed to “go not up into the mount, or touch the border of it” (Ex 19:12).